code: def user_context(
      c: Traceback | None, *, name_stack: NameStack | None = None
  ):
      prev = _source_info_context.context
      _source_info_context.context = (
          _source_info_context.context.replace(
              traceback=c, name_stack=name_stack
          )
      )
      filtered_tb = None
      try:
          yield
      except Exception as e:
          if c is None or has_user_context(e):
              raise
          filtered_tb = traceback_util.filter_traceback(
              c.as_python_traceback()
          )
          if filtered_tb:
              msg = traceback_util.format_exception_only(e)
              msg = f"{msg}\n\n{_message}"
              exp = JaxStackTraceBeforeTransformation(
                  msg
              ).with_traceback(filtered_tb)
              exp.__context__ = e.__context__
              exp.__cause__ = e.__cause__
              exp.__suppress_context__ = e.__suppress_context__
              e.__context__ = None
              e.__cause__ = exp
          raise
      finally:
          _source_info_context.context = prev
          del filtered_tb
  
imports: from __future__ import annotations
  from collections.abc import Iterator
  import contextlib
  import dataclasses
  import functools
  import itertools
  import os.path
  import sys
  import sysconfig
  import threading
  import types
  from typing import NamedTuple
  import jax.version
  from jax._src.lib import xla_client
  from jax._src import traceback_util
label_desc: Use image node_id 12 for calling a global function with example usage: user_context(c) without return types