(exp, cls)
Does `node` contain a sub node of type `cls`
Does `node` contain a sub node of type `cls`
Does node contain a sub node of type cls
def _contains(exp, cls):
    """Does `node` contain a sub node of type `cls`"""
    if isinstance(exp, cls):
        return True
    elif isinstance(exp, Var):
        return False
    else:
        return _contains(exp.sub, cls)
def _contains ( exp , cls ) : if isinstance ( exp , cls ) : return True elif isinstance ( exp , Var ) : return False else : return _contains ( exp . sub , cls )