Return a list of key bindings that can handle this key.
        (This return also inactive bindings, so the `filter` still has to be
        called, for checking it.)

        :param keys: tuple of keys.
327953
def get_bindings_for_keys(self, keys):
        
        def get():
            result = []
            for b in self.key_bindings:
                if len(keys) == len(b.keys):
                    match = True
                    any_count = 0

                    for i, j in zip(b.keys, keys):
                        if i != j and i != Keys.Any:
                            match = False
                            break

                        if i == Keys.Any:
                            any_count += 1

                    if match:
                        result.append((any_count, b))

            # Place bindings that have more 'Any' occurences in them at the end.
            result = sorted(result, key=lambda item: -item[0])

            return [item[1] for item in result]

        return self._get_bindings_for_keys_cache.get(keys, get)
378090
def keys(self, id=None, search=None):
        
        if self._keys is None:
            self._keys = {}
            self._list_keys()

        if id:
            return [self._keys[key_id] for key_id in self._keys.keys()
                    if id == self._keys[key_id].id]
        elif search:
            return [self._keys[key_id] for key_id in self._keys.keys()
                    if (search in self._keys[key_id].id) or (search in self._keys[key_id].name)]
        else:
            return [self._keys[key_id] for key_id in self._keys.keys()]
990404
def has_keys(self, keys):
        
        self.is_a(Mapping)
        self.contains_all_of(keys)
        return ChainInspector(self._subject)
1268422
static Key[] toNativeKeys(List<DatastoreKey> keys) {
    Key[] nativeKeys = new Key[keys.size()];
    for (int i = 0; i < keys.size(); i++) {
      nativeKeys[i] = keys.get(i).nativeKey();
    }
    return nativeKeys;
  }
934502
def keys(self):
		
		if hasattr(self._nodes, 'iterkeys'):
			return self._nodes.keys()
		else:
			return tuple(self._nodes.keys())
412936
public static List<GUIObjectDetails> transformKeys(List<String> keys) {
        return transformKeys(keys, TestPlatform.WEB);
    }
858296
public static <R> Set<R> filterAndListKeys(Iterator<R> keys, KeyFilter<R> filter) {
        Set<R> ret = new HashSet<R>();
        while (keys.hasNext()) {
            R key = keys.next();
            R filtered = filter.filter(key);
            if (filtered != null) {
                ret.add(filtered);
            }
        }
        return ret;
    }
1286700
protected List<?> keysToIds(final List<Key<T>> keys) {
        final List<Object> ids = new ArrayList<Object>(keys.size() * 2);
        for (final Key<T> key : keys) {
            ids.add(key.getId());
        }
        return ids;
    }
375508
def _bindingsToDict(self, bindings):
        
        myDict = {}
        for key, val in bindings.iteritems():
            myDict[key.toPython().replace('?', '')] = val.toPython()
        return myDict
1066385
def get_keys(self) -> typing.List[str]:
        
        keys = []
        for key in self.data.keys():
            if key not in ['__header__', '__version__', '__globals__']:
                keys.append(key)
        return keys
875606
def all_keys(self):
        '''
        
        '''
        keys = self.list_keys()
        keys.update(self.local_keys())
        return keys
1266180
def keys(self):
        
        if len(self._row_name_list) != len(self._rows):
            raise NotImplementedError("You can't get row keys for a FVM that doesn't have all rows keyed")

        return self.row_names()
299736
def mget(self, *keys):
        
        return list(map(
            self._loads, self._client.hmget(self.key_prefix, *keys)))
1299704
def get_keys(self):
        
        return [(self.first_key + i) for i in range(0, len(self.targets))]
529997
def filter_kwargs(keys, kwargs):
    
    for k in keys:
        if k in kwargs:
            yield (k, kwargs[k])
581735
def set_keys(self, keys):
        
        codes = {}
        for key in keys:
            parts = [k.strip().lower() for k in key.split("+")]
            code = KEYS.get(parts[-1])
            modifier = Qt.KeyboardModifiers()
            if code is None:
                raise KeyError("Invalid key code '{}'".format(key))
            if len(parts) > 1:
                for mod in parts[:-1]:
                    mod_code = MODIFIERS.get(mod)
                    if mod_code is None:
                        raise KeyError("Invalid key modifier '{}'"
                                       .format(mod_code))
                    modifier |= mod_code
            if code not in codes:
                codes[code] = []
            codes[code].append(modifier)
        self.codes = codes
1267991
def get_values(self, keys):
        
        if is_string(keys):
            return [s.__dict__[keys] for s in self.sections]
        else:
            values = []
            for k in keys:
                values.append([s.__dict__[k] for s in self.sections])
            return values