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

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
convert the argument of basic .