@contextlib.contextmanager
def override_config(name, value):
 old_value = getattr(config, name)
 setattr(config, name, value)
 try:
  (yield)
 finally:
  setattr(config, name, old_value)

@ contextlib . contextmanager def override_config ( name , value ) : old_value = getattr ( config , name ) setattr ( config , name , value ) try : ( yield ) finally : setattr ( config , name , old_value )
return a context manager that temporarily sets numba config variable *name* to *value* .