def query(self, q):
        """Perform a query and return the results and metadata.

        The first element of the tuple contains the metadata, which can be any
        value and is specific to the backend being used. The second element is
        a list of the items matching the query.

        >>> t = Taxon(MemoryBackend())
        >>> t.tag('ice', 'Dewgong', 'Articuno')
        >>> t.tag('flying', 'Articuno', 'Pidgeotto')
        >>> t.query(Tag('ice') & Tag('flying'))
        (None, ['Articuno'])
        """
        if not isinstance(q, (tuple, Query)):
            raise ValueError("%r is not a valid query" % q)
        return self.backend.query(q)
dataset/ETHPy150Open jdp/taxon/taxon/core.py/Taxon.query/original