def query(self, *args, **kwargs):
clone = self._clone()<EOL>queries = []<EOL>from pyes.query import Query<EOL>if args:<EOL><INDENT>for f in args:<EOL><INDENT>if isinstance(f, Query):<EOL><INDENT>queries.append(f)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>for field, value in kwargs.items():<EOL><INDENT>if value == [None]:<EOL><INDENT>value = ["<STR_LIT>"]<EOL><DEDENT>queries.append(self._build_inner_query(field, value))<EOL><DEDENT>clone._queries.extend(queries)<EOL>return clone<EOL>
Returns a new QuerySet instance with the args ANDed to the existing
set.