def _has(self, expr, attrs, types):
        if not (attrs or types):
            return True

        if attrs and self._hasattrs(expr, attrs):
            return True

        if types and self._hastypes(expr, types):
            return True

        return False
Apply ``_hasattrs`` and ``_hastypes`` to ``expr``.
dataset/ETHPy150Open sympy/sympy/sympy/simplify/epathtools.py/EPath._has