def _get_tag_name_from_entries(media_entries, tag_slug):
    """
    Get a tag name from the first entry by looking it up via its slug.
    """
    # ... this is slightly hacky looking :\
    tag_name = tag_slug

    for entry in media_entries:
        for tag in entry.tags:
            if tag['slug'] == tag_slug:
                tag_name = tag['name']
                break
        break
    return tag_name