:param key: Which of key to return from "cid", "type", and "extention"
        :return: A list of x 'key'
559576
def list_x(self, key=None):
        
        if key in ("cid", "type"):
            return sorted(set(operator.methodcaller(key)(p)
                              for p in self._processors.values()))
        if key == "extension":
            return sorted(k for k, _v in self.list_by_x("extensions"))

        raise ValueError("keyword argument 'key' must be one of "
                         "None, 'cid', 'type' and 'extension' "
                         "but it was '%s'" % key)
593657
function getType(key, req) {
  var val = this.getKey(key, req);
  if(val === undefined) return undefined;
  return val.rtype || TYPE_NAMES.STRING;
}
1080837
def cget(self, key):
        
        if key == 'showvalue':
            return self._showvalue
        elif key == 'tickinterval':
            return self._tickinterval
        elif key == 'tickpos':
            return self._tickpos
        elif key == 'labelpos':
            return self._labelpos
        elif key == 'digits':
            return self._digits
        elif key == 'resolution':
            return self._resolution
        else:
            return self.scale.cget(key)
634770
def __prefix_key(self, key):
        
        # If there isn't a prefix don't bother
        if self.prefix is None:
            return key

        # Don't prefix key if it already has it
        if key.startswith(self.prefix + "-"):
            return key

        return "{0}-{1}".format(self.prefix, key)
914713
def todict(self):
        
        return {"f_key": hb_encode(self.f_key),
                "alpha_key": hb_encode(self.alpha_key),
                "chunks": self.chunks,
                "encrypted": self.encrypted,
                "iv": hb_encode(self.iv),
                "hmac": hb_encode(self.hmac)}
263972
def from_key(key):
    
    model = get_model_from_key(key)
    if model is None:
        raise BadKeyError
    try:
        _, id = key.split(':', 2)
        id = int(id)
    except ValueError, TypeError:
        raise BadKeyError
    return model.objects.get_by_id(id)
172686
def __key(self):
        

        return (self.latex_name, self.arguments, self.options,
                self.extra_arguments)
1129466
def _encode_key(self, key):
        
        if isinstance(key, str) or isinstance(key, unicode):
            key = key.encode(self._keyencoding)
        elif not isinstance(key, bytes):
            raise TypeError("key must be bytes or str")
        return codecs.encode(key, 'hex_codec').decode(self._keyencoding)
881999
def key(self):
        '''  '''
        prefix = type(self).cls_key()

        return '{}:{}:obj'.format(prefix, self.id)
431278
def getall(self, key, type=None):
        
        values = []
        for k, v in self._items:
            if k == key:
                if type is not None:
                    try:
                        values.append(type(v))
                    except ValueError:
                        pass
                else:
                    values.append(v)
        return values
862394
def getlist(self, key, default=[]):
        
        if key in self:
            return [node.value for node in self._map[key]]
        return default
1205662
def key(self, key=""):
    
    params = join_params(self.parameters, {"key": key})

    return self.__class__(**params)
337447
def keys(self):
        
        return_value = []
        for s in self.serializers:
            return_value += s.content_type
        return return_value
561482
def get_key(self, key):
        
        return self.__mapping.get(self.type(key), self.__getitem__)(key)
1358472
async def ListKeys(self, entities, mode):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='KeyManager',
                   request='ListKeys',
                   version=1,
                   params=_params)
        _params['entities'] = entities
        _params['mode'] = mode
        reply = await self.rpc(msg)
        return reply
754564
def get_other_keys(self, key, including_current=False):
        
        other_keys = []
        if key in self:
            other_keys.extend(self.__dict__[str(type(key))][key])
            if not including_current:
                other_keys.remove(key)
        return other_keys
1177427
def get_list_key(self, data, key, header_lines=2):
        
        return super(NumpydocTools, self).get_list_key(data, key, header_lines=header_lines)