def _check_engine(engine):
 if (engine is None):
  if _NUMEXPR_INSTALLED:
   engine = 'numexpr'
  else:
   engine = 'python'
 if (engine not in _engines):
  raise KeyError('Invalid engine {0!r} passed, valid engines are {1}'.format(engine, list(_engines.keys())))
 if (engine == 'numexpr'):
  if (not _NUMEXPR_INSTALLED):
   raise ImportError("'numexpr' is not installed or an unsupported version. Cannot use engine='numexpr' for query/eval if 'numexpr' is not installed")
 return engine

def _check_engine ( engine ) : if ( engine is None ) : if _NUMEXPR_INSTALLED : engine = 'numexpr' else : engine = 'python' if ( engine not in _engines ) : raise KeyError ( 'Invalid engine {0!r} passed, valid engines are {1}' . format ( engine , list ( _engines . keys ( ) ) ) ) if ( engine == 'numexpr' ) : if ( not _NUMEXPR_INSTALLED ) : raise ImportError ( "'numexpr' is not installed or an unsupported version. Cannot use engine='numexpr' for query/eval if 'numexpr' is not installed" ) return engine
make sure a valid engine is passed .