Get the value for the device object associated with this filter.

        If :meth:`match` is False for the device, the return value of this
        method is undefined.
768959
def value(self, kind, device):
        
        self._log.debug(_('{0}(match={1!r}, {2}={3!r}) used for {4}',
                          self.__class__.__name__,
                          self._match,
                          kind, self._values[kind],
                          device.object_path))
        return self._values[kind]
146992
def get(self, *args, **kwargs):
        
        results = self.search(*args, **kwargs)
        num_results = len(results)
        if num_results == 1:
            return results[0]
        if num_results > 1:
            raise MultipleObjectsFound()
        raise ObjectNotFound()
123589
def get_devices(device_type: DeviceType) -> Iterator[str]:
    
    for device in BASE_PATH.iterdir():
        with open(str(Path(device, 'type'))) as type_file:
            if type_file.readline().strip() == device_type.value:
                yield device.name
92599
def get(cls, **kwargs):
        
        things = cls.filter(**kwargs)
        if len(things) > 1:
            # Raise an exception if more than one object is matched
            raise cls.MultipleObjectsReturned
        elif len(things) == 0:
            # Rase an exception if no objects were matched
            raise cls.DoesNotExist
        return things[0]
661393
function(devices)
		{
			for (var i in devices)
			{
				var device = devices[i]
				if (device.name == params.name)
				{
					console.log('Found bonded device: ' + device.name)
					params.onFound(device)
					return // bonded device found
				}
			}
			params.onNotFound()
		}
945251
def get_match_value(rexobj, key, index=0):
    '''
    
    '''
    if rexobj is None:
        return None

    if rexobj.res_count == 0:
        return None

    try:
        return rexobj.matches[index].named_groups[key]
    except IndexError:
        return None
    except KeyError:
        return None
526191
def get_member_device(self, device):
        
        for vmedia_device in self.get_members():
            if device in vmedia_device.media_types:
                return vmedia_device
1192363
function findDevice()
{
	disconnectDevice()

	// Used for debugging/testing.
	//scanForDevice()
	//return

	searchForBondedDevice({
		name: 'HEXIWEAR',
		serviceUUIDs: [INFO_SERVICE],
		onFound: connectToDevice,
		onNotFound: scanForDevice,
		})
}
178318
def match(self, item):
        
        result = self._value == getattr(item, self._name)
        #log.debug("%r for %r = %r, name %r, item %r" % (
        #    result, getattr(item, self._name), self._value, self._name, item))
        return result
495908
def value(self):
        
        return (
            -self.enable_device.value
            if self.phase_device.is_active else
            self.enable_device.value
        )
1047752
def get_device_model(self, cat, sub_cat, key=''):
        """"""
        if cat + ':' + sub_cat in self.device_models:
            return self.device_models[cat + ':' + sub_cat]
        else:
            for i_key, i_val in self.device_models.items():
                if 'key' in i_val:
                    if i_val['key'] == key:
                        return i_val
            return False
563703
def get_value(cls, object_version, key):
        """"""
        obj = cls.get(object_version, key)
        return obj.value if obj else None
1294350
def get_device_info(self, bigip):
        '''
        '''

        coll = bigip.tm.cm.devices.get_collection()
        device = [device for device in coll if device.selfDevice == 'true']
        assert len(device) == 1
        return device[0]
125205
def get_value(self, subject=None, predicate=None, object_=None):
        """"""

        for triple in self.triples:

            # Filter out non-matches
            if (subject and triple['subject'] != subject) or \
               (predicate and triple['predicate'] != predicate) or \
               (object_ and triple['object'] != object_):  # pragma: no cover
                continue

            # Return the first found.
            return triple

        return None
1248982
def matches(self, filter_props):
        """"""
        if filter_props is None:
            return False

        found_one = False
        for key, value in filter_props.items():
            if key in self.properties and value != self.properties[key]:
                return False
            elif key in self.properties and value == self.properties[key]:
                found_one = True

        return found_one
546682
def _extract_device_name_from_event(event):
  """"""
  plugin_data_content = json.loads(
      tf.compat.as_str(event.summary.value[0].metadata.plugin_data.content))
  return plugin_data_content['device']
225831
def get(self, item, default_value=None):
        

        found, name = self._contains_and_name(item)
        if found:
            return self._record_map[name]['value']
        else:
            return default_value