'Given a list of strings, return a genre by joining them into a
single string and (optionally) canonicalizing each.'

def _resolve_genres(self, tags):

    if (not tags):
        return None
    count = self.config['count'].get(int)
    if self.c14n_branches:
        tags_all = []
        for tag in tags:
            if self.whitelist:
                parents = [x for x in find_parents(tag, self.c14n_branches) if self._is_allowed(x)]
            else:
                parents = [find_parents(tag, self.c14n_branches)[(-1)]]
            tags_all += parents
            if ((not self.config['prefer_specific']) and (len(tags_all) >= count)):
                break
        tags = tags_all
    tags = deduplicate(tags)
    if self.config['prefer_specific']:
        tags = self._sort_by_depth(tags)
    tags = [x.title() for x in tags if self._is_allowed(x)]
    return self.config['separator'].as_str().join(tags[:self.config['count'].get(int)])
