code: func notifyProfileAssociates(dp models.DeviceProfile, action string) error {
  	// Get the devices
  	d, err := dbClient.GetDevicesByProfileId(dp.Id)
  	if err != nil {
  		LoggingClient.Error(err.Error())
  		return err
  	}
  
  	// Get the services for each device
  	// Use map as a Set
  	dsMap := map[string]models.DeviceService{}
  	ds := []models.DeviceService{}
  	for _, device := range d {
  		// Only add if not there
  		if _, ok := dsMap[device.Service.Id]; !ok {
  			dsMap[device.Service.Id] = device.Service
  			ds = append(ds, device.Service)
  		}
  	}
  
  	if err := notifyAssociates(ds, dp.Id, action, models.PROFILE); err != nil {
  		LoggingClient.Error(err.Error())
  		return err
  	}
  
  	return nil
  }
docs: // Notify the associated device services for changes in the device profile