human
I wrote the below code

    def resolve_domain(domain):
        "Return    domain    id.\n\n                                Input    is    a    dictionary    with    a    domain    identified    either    by    a    ``id``    or    a\n                                ``name``.    In    the    latter    case    system    will    attempt    to    fetch    domain    object\n                                from    the    backend.\n\n                                :returns:    domain's    id\n                                :rtype:    str\n\n                                "
        domain_id = (domain.get('id') or resource_api.get_domain_by_name(domain.get('name')).get('id'))
        return domain_id
    for group in group_names:
        try:
            group_dict = identity_api.get_group_by_name(group['name'], resolve_domain(group['domain']))
            (yield group_dict['id'])
        except exception.GroupNotFound:
            raise exception.MappedGroupNotFound(group_id=group['name'], mapping_id=mapping_id)

What's a good function header?

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

def transform_to_group_ids(group_names, mapping_id, identity_api, resource_api):