def any(self, criterion=None, **kwargs):

        if self._value_is_scalar:
            value_expr = getattr(
                self.target_class, self.value_attr).has(criterion, **kwargs)
        else:
            value_expr = getattr(
                self.target_class, self.value_attr).any(criterion, **kwargs)

        # check _value_is_scalar here, otherwise
        # we're scalar->scalar - call .any() so that
        # the "can't call any() on a scalar" msg is raised.
        if self.scalar and not self._value_is_scalar:
            return self._comparator.has(
                value_expr
            )
        else:
            return self._comparator.any(
                value_expr
            )
Produce a proxied 'any' expression using EXISTS.
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/ext/associationproxy.py/AssociationProxy.any