code: def set_env(**environ: tp.Any) -> tp.Generator[None, None, None]:
      """Temporarily changes environment variables."""
      old_environ = {x: os.environ.get(x, None) for x in environ}
      for x in environ:
          if x != x.upper():
              raise ValueError(
                  f"Only capitalized environment variable are allowed, but got {x!r}"
              )
      os.environ.update({x: str(y) for x, y in environ.items()})
      try:
          yield
      finally:
          for k, val in old_environ.items():
              os.environ.pop(k)
              if val is not None:
                  os.environ[k] = val
  
imports: import os
  import site
  import glob
  import ctypes
  import time
  import inspect
  import warnings
  import itertools
  import contextlib
  import collections
  import typing
  import numpy
  from nevergrad.common import sphere
label_desc: Use image node_id 7 for calling a global function with example usage: set_env() without return types