def _guess_genre_and_host_from_aliases(self):
        """Uses available aliases to decide the item's genre"""

        # logger.debug(u"in decide_genre with {alias_dict}".format(
        #     alias_dict=alias_dict))

        genre = "unknown"
        host = "unknown"

        if hasattr(self, "doi"):
            joined_doi_string = "".join(self.doi).lower()
            if "10.5061/dryad." in joined_doi_string:
                genre = "dataset"
                host = "dryad"
            elif joined_doi_string in ".figshare.":
                # if was already set to something, wouldn't be here
                host = "figshare"
                genre = "dataset"
            else:
                genre = "article"

        elif hasattr(self, "pmid"):
            genre = "article"

        elif hasattr(self, "arxiv"):
            genre = "article"
            host = "arxiv"

        elif hasattr(self, "blog"):
            genre = "blog"
            host = "wordpresscom"

        elif hasattr(self, "blog_post"):
            genre = "blog"
            host = "blog_post"

        elif hasattr(self, "url"):
            joined_url_string = "".join(self.url).lower()
            if "slideshare.net" in joined_url_string:
                genre = "slides"
                host = "slideshare"
            elif "github.com" in joined_url_string:
                genre = "software"
                host = "github"
            elif ("youtube.com" in joined_url_string) or ("youtu.be" in joined_url_string):
                genre = "video"
                host = "youtube"
            elif "vimeo.com" in joined_url_string:
                genre = "video"
                host = "vimeo"
            else:
                genre = "webpage"

        return genre, host
dataset/ETHPy150Open Impactstory/total-impact-webapp/totalimpactwebapp/aliases.py/Aliases._guess_genre_and_host_from_aliases/swapped operands of `in`