code: func (mc MongoClient) getDeviceProfiles(q bson.M) ([]contract.DeviceProfile, error) {
  	s := mc.session.Copy()
  	defer s.Close()
  
  	var dps []models.DeviceProfile
  	err := s.DB(mc.database.Name).C(db.DeviceProfile).Find(q).Sort("queryts").All(&dps)
  	if err != nil {
  		return []contract.DeviceProfile{}, errorMap(err)
  	}
  
  	cdps := make([]contract.DeviceProfile, 0)
  	for _, dp := range dps {
  		c, err := dp.ToContract(mc)
  		if err != nil {
  			return []contract.DeviceProfile{}, err
  		}
  		cdps = append(cdps, c)
  	}
  	return cdps, nil
  }
docs: // Get device profiles with the passed query