def __and__(self, restriction):
        """
        Restriction operator
        :return: a restricted copy of the input argument
        See QueryExpression.restrict for more detail.
        """
        return (Subquery.create(self)  # the HAVING clause in GroupBy can handle renamed attributes but WHERE cannot
                if not(is_true(restriction)) and self.heading.expressions and not isinstance(self, GroupBy)
                else self.__class__(self)).restrict(restriction)
def __and__ ( self , restriction ) : return ( Subquery . create ( self ) if not ( is_true ( restriction ) ) and self . heading . expressions and not isinstance ( self , GroupBy ) else self . __class__ ( self ) ) . restrict ( restriction )
Restriction operator
        :return: a restricted copy of the input argument
        See QueryExpression.restrict for more detail.