def get_aliases(self, query):
        query_url = "{api_url}/provider/{provider_name}/memberitems/{query}?method=sync".format(
            api_url=api_url,
            provider_name=self.provider_name,
            query=query
        )
        start = time.time()
        logger.info(u"getting aliases from the {provider} importer, using url '{url}'".format(
                provider=self.provider_name, url=query_url))
        r = requests.get(query_url)

        try:
            response = json.loads(r.text)
            aliases = response["memberitems"]
            logger.debug(u"got some aliases from the http call: " + str(aliases))
        except __HOLE__:
            logger.warning(u"{provider} importer returned no json for {query}".format(
                    provider=self.provider_name, query="query"))
            aliases = []

        # annoyingly, some providers return lists-as-IDs, which must be joined with a comma
        aliases = [(namespace, id) if isinstance(id, str)
                   else (namespace, ",".join(id)) for namespace, id in aliases]

        logger.info(u"{provider} importer got {num_aliases} aliases with username '{q}' in {elapsed} seconds.".format(
                provider=self.provider_name, num_aliases=len(aliases), q=query, elapsed=round(time.time() - start, 2)))

        return aliases
dataset/ETHPy150Open Impactstory/total-impact-core/totalimpact/fakes.py/Importer.get_aliases