Retrieve a (v2) detector by id.
431325
def get_detector(self, id, **kwargs):
        "
        resp = self._get_object_by_name(self._DETECTOR_ENDPOINT_SUFFIX, id,
                                        **kwargs)
        return resp
722837
def _get_oid(data, position, dummy0, dummy1, dummy2):
    """"""
    end = position + 12
    return ObjectId(data[position:end]), end
1319543
def get_item_with_id(self, uid):
        
        for item in self.get_items():
            if item.id == uid:
                return item

        return None
164598
def get(self, device_id: int) -> Optional[Device]:
        """"""
        return self._devices.get(device_id)
80974
def get(self, mongo_id):
        """"""
        try:
            return self.filter(self.type.mongo_id == mongo_id).first()
        except exceptions.BadValueException:
            return None
976635
def get(cls, id):
        

        # cached?
        if CACHE:
            if id in _cache['Prefix']:
                log.debug('cache hit for prefix %d' % id)
                return _cache['Prefix'][id]
            log.debug('cache miss for prefix %d' % id)

        try:
            prefix = Prefix.list({'id': id})[0]
        except IndexError:
            raise NipapNonExistentError('no prefix with ID ' + str(id) + ' found')

        _cache['Prefix'][id] = prefix
        return prefix
947344
def get_polid(self, obj):
        """"""
        ap_id = obj.candidate_election.candidate.ap_candidate_id
        if 'polid-' in ap_id:
            return ap_id.replace('polid-', '')
        return None
278819
def get(identifier, value=None):
  """"""
  if value is None:
    value = identifier
  if identifier is None:
    return None
  elif isinstance(identifier, dict):
    try:
      return deserialize(identifier)
    except ValueError:
      return value
  elif isinstance(identifier, six.string_types):
    config = {'class_name': str(identifier), 'config': {}}
    try:
      return deserialize(config)
    except ValueError:
      return value
  elif callable(identifier):
    return identifier
  return value
20521
function getId(id){
        if(_.isObject(id) && !_.isUndefined(id.id)){
            if (objectIdRegex.test(id.id)) {
                id = id.id;
            }
            else {
                id = null;
            }
        }
        return id;
    }
664458
def find_d2ifile(flist,detector):
    
    d2ifile = None
    for f in flist:
        fdet = fits.getval(f, 'detector', memmap=False)
        if fdet == detector:
            d2ifile = f
    return d2ifile
309996
def to_det_id(self, det_id_or_det_oid):
        """"""
        try:
            int(det_id_or_det_oid)
        except ValueError:
            return self.get_det_id(det_id_or_det_oid)
        else:
            return det_id_or_det_oid
728526
def get_object(self, id, **args):
        """"""
        return self.request("{0}/{1}".format(self.version, id), args)
1161400
def find_one(self, cls, id):
        """"""
        one = self._find(cls, {"_id": id})
        if not one:
            return None
        return one[0]
1209928
def _get_id(self):
        """"""
        return ''.join(map(str,
                           filter(is_not_None,
                                  [self.Prefix, self.Name])))
1051359
def get(cls, id):
        '''  '''

        if not id:
            return None

        redis = cls.get_redis()
        key = '{}:{}:obj'.format(cls.cls_key(), id)

        if not redis.exists(key):
            return None

        obj = cls(id=id)
        obj._persisted = True

        data = debyte_hash(redis.hgetall(key))

        for fieldname, field in obj.proxy:
            value = field.recover(data, redis)

            setattr(
                obj,
                fieldname,
                value
            )

        return obj
236844
def retrieve_by_id(self, id_):
        """"""
        items_with_id = [item for item in self if item.id == int(id_)]
        if len(items_with_id) == 1:
            return items_with_id[0].retrieve()
257207
function _getBarById(id) {
			return _rawdata.reduce(function (result, item) {
				if (item.uid === id) {
					result = item;
				}

				return result;
			}, null);
		}