def filter(self, *args):
if not args:<EOL><INDENT>return self<EOL><DEDENT>preds = []<EOL>f = self.filters<EOL>if f:<EOL><INDENT>preds.append(f)<EOL><DEDENT>for arg in args:<EOL><INDENT>if not isinstance(arg, Node):<EOL><INDENT>raise TypeError('<STR_LIT>' % arg)<EOL><DEDENT>preds.append(arg)<EOL><DEDENT>if not preds:<EOL><INDENT>pred = None<EOL><DEDENT>elif len(preds) == <NUM_LIT:1>:<EOL><INDENT>pred = preds[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>pred = ConjunctionNode(*preds)<EOL><DEDENT>return self.__class__(kind=self.kind, ancestor=self.ancestor,<EOL>filters=pred, orders=self.orders,<EOL>app=self.app, namespace=self.namespace,<EOL>default_options=self.default_options,<EOL>projection=self.projection, group_by=self.group_by)<EOL>
Return a new Query with additional filter(s) applied.