'Get a genre based on the named entity using the callable `method`
whose arguments are given in the sequence `args`. The genre lookup
is cached based on the entity name and the arguments. Before the
lookup, each argument is has some Unicode characters replaced with
rough ASCII equivalents in order to return better results from the
Last.fm database.'

def _last_lookup(self, entity, method, *args):

    if any(((not s) for s in args)):
        return None
    key = u'{0}.{1}'.format(entity, u'-'.join((six.text_type(a) for a in args)))
    if (key in self._genre_cache):
        return self._genre_cache[key]
    else:
        args_replaced = []
        for arg in args:
            for (k, v) in REPLACE.items():
                arg = arg.replace(k, v)
            args_replaced.append(arg)
        genre = self.fetch_genre(method(*args_replaced))
        self._genre_cache[key] = genre
        return genre
