def METHOD_NAME(self, things, id=None, name=None, scheme=None, typ=None):
    if name:
        if typ == 'person':
            return [p for p in things.values() if self.names[p['id']] == name]
        else:
            return [o for o in things.values() if o['name'] == name]
    if id:
        if scheme:
            try:
                return next(p for p in things.values() for i in p.get('identifiers', []) if i['scheme'] == scheme and i['identifier'] == id)
            except StopIteration:
                return None
        else:
            return next(o for o in things.values() if o['id'] == id)