code: def new_log_context(**kwargs):
      context_id = "mdc-{thread}-{context}".format(
          thread=threading.current_thread().ident, context=uuid.uuid4()
      )
  
      LOGGER.debug("creating context %s", context_id)
  
      setattr(logging._mdc, context_id, threading.local())  # type: ignore
  
      context = getattr(logging._mdc, context_id)  # type: ignore
  
      context.__creation_time__ = time.time() - start
  
      for key, value in kwargs.items():
          setattr(context, key, value)
  
      try:
          yield context
  
      finally:
          LOGGER.debug("deleting context %s", context_id)
  
          try:
              delattr(logging._mdc, context_id)  # type: ignore
          except AttributeError:
              LOGGER.warning(
                  "context was already deleted %s", context_id
              )
  
file_path: upgini/src/upgini/mdc/context.py
imports: import time
  import uuid
  import logging
  import threading
  import collections
  from contextlib import contextmanager
label_desc: Use image node_id 2 for calling a global function with example usage: new_log_context() without return types