(query)
return query
Convert the argument of Basic.find() into a callable
Convert the argument of Basic.find() into a callable
Convert the argument of Basic . find () into a callable
def _make_find_query(query):
    """Convert the argument of Basic.find() into a callable"""
    try:
        query = sympify(query)
    except SympifyError:
        pass
    if isinstance(query, type):
        return lambda expr: isinstance(expr, query)
    elif isinstance(query, Basic):
        return lambda expr: expr.match(query) is not None
    return query
def _make_find_query ( query ) : try : query = sympify ( query ) except SympifyError : pass if isinstance ( query , type ) : return lambda expr : isinstance ( expr , query ) elif isinstance ( query , Basic ) : return lambda expr : expr . match ( query ) is not None return query