<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def advanced_search(self, terms, relation=None, index=0, limit=25, **kwargs):
 """ Advanced search of track, album or artist. See `Search section of Deezer API <https://developers.deezer.com/api/search>`_ for search terms. :returns: a list of :class:`~deezer.resources.Resource` objects. """

        assert isinstance(terms, dict), "terms must be a dict"
        # terms are sorted (for consistent tests between Python < 3.7 and >= 3.7)
        query = " ".join(sorted(['{}:"{}"'.format(k, v) for (k, v) in terms.items()]))
        return self.get_object(
            "search", relation=relation, q=query, index=index, limit=limit, **kwargs
        )