human
I wrote the below code

    def _MakeIdentityDict(ident):
        i_dict = {'identity': ident.key}
        if (ident.authority is not None):
            i_dict['authority'] = ident.authority
        return i_dict
    query_expr = ('identity.user_id=%d' % user_id)
    identities = (yield gen.Task(Identity.IndexQuery, client, query_expr, ['key', 'authority']))
    raise gen.Return({'identities': [_MakeIdentityDict(ident) for ident in identities]})

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

@gen.coroutine
def ListIdentities(client, obj_store, user_id, device_id, request):