code: def update_env(**kwargs):
      override_env = {k: v for k, v in kwargs.items() if v is not None}
      old = os.environ.copy()
      try:
          os.environ.update(override_env)
          yield
      finally:
          os.environ = old
  
imports: import os
  from contextlib import contextmanager
  from typing import Optional
  from ludwig.utils.fs_utils import upload_output_directory
label_desc: Use image node_id 2 for calling a global function with example usage: update_env() without return types