Given a key, yield a singular spec representing that key.

    :API: public
494293
def injectables_spec_for_key(self, key):
    
    specs = self.injectables_specs_for_key(key)
    specs_len = len(specs)
    if specs_len == 0:
      return None
    if specs_len != 1:
      raise self.TooManySpecsForKey('injectables spec mapping for key included {} elements, '
                                    'expected 1'.format(specs_len))
    return specs[0]
1077604
def Get(self,key):
		

		for template in self.templates:
			if template.id == key:  return(template)
419585
def _gen_key(self, key):
        
        b_key = self._md5_digest(key)
        return self._hashi(b_key, lambda x: x)
966165
def get(key, opts = {})
      response = api_execute(key_endpoint + key, :get, params: opts)
      Response.from_http_response(response)
    end
446609
def getKey(self, key):
		
		data = self.getDictionary()
		if key in data:
			return data[key]
		else:
			return None
587140
def get(self, key, default=None):
        
        try:
            return self[key]
        except KeyError:
            return default or self._default
954314
function Spec(cidKey, sidKey) {
    if (!_.isString(cidKey))
        throw new TypeError("cid should be a string, such as 'genBasic'.");

    if (!_.isString(sidKey))
        throw new TypeError("sid should be a string, such as 'attrs' and 'cmds'.");

    this.cid = cidKey;    // cid is a string
    this.sid = sidKey;    // sid is a string
}
1103238
def __dict_to_pod_spec(spec):
    '''
    
    '''
    spec_obj = kubernetes.client.V1PodSpec()
    for key, value in iteritems(spec):
        if hasattr(spec_obj, key):
            setattr(spec_obj, key, value)

    return spec_obj
212954
def get(self, key, default=UndefinedKey):
        
        return self._get(ConfigTree.parse_key(key), 0, default)
1359319
function(key, qualifier) {
            return tFunc.qualTrv.call(this, {
                method: "find",
                key: key,
                qualifier: qualifier
            });
        }
611530
def _iter_keys_as_str(key):
    
    for i in range(winreg.QueryInfoKey(key)[0]):
        yield winreg.EnumKey(key, i)
229024
def get(self, key, default=None):
        
        try:
            val = self[key]
        except KeyError:
            val = default
        return val
905970
def unique(iterable, key=None):
    
    ensure_iterable(iterable)
    key = hash if key is None else ensure_callable(key)

    def generator():
        seen = set()
        for elem in iterable:
            k = key(elem)
            if k not in seen:
                seen.add(k)
                yield elem

    return generator()
1101582
def [](key)
      if hash.key?(key)           then hash[key]
      elsif hash.key?(key.to_sym) then hash[key.to_sym]
      elsif hash.key?(key.to_s)   then hash[key.to_s]
      end
    end
51464
def get(self, key, default=None):
        
        try:
            result = self._loads(self._client.hget(self.key_prefix, key))
            assert result is not None
            return result
        except (AssertionError, KeyError):
            return default or self._default
530793
def realpath(self, spec, key):
        

        if key not in spec:
            # do nothing for now
            return

        if not spec[key]:
            logger.warning(
                "cannot resolve realpath of '%s' as it is not defined", key)
            return

        check = realpath(join(spec.get(WORKING_DIR, ''), spec[key]))
        if check != spec[key]:
            spec[key] = check
            logger.warning(
                "realpath of '%s' resolved to '%s', spec is updated",
                key, check
            )
        return check
888703
def dict_of(**kwargs):
    

    class DictOfKeyGenerators(ArbitraryInterface):
        """
        A closure class around the keys and generators specified above, which
        generates a dict of the keys and generators.
        """

        @classmethod
        def arbitrary(cls):
            """
            Generate a dict of the enclosed keys and generators.
            """
            return {
                key: arbitrary(generator)
                for key, generator in kwargs.iteritems()
            }

    DictOfKeyGenerators.__name__ = ''.join([
        'dict_of(', ', '.join([
            key + '=' + generator.__name__
            for key, generator in kwargs.iteritems()
        ]), ')'
    ])
    return DictOfKeyGenerators