code: def add_debug_info(
      f: WrappedFun, debug_info: TracingDebugInfo | None
  ) -> WrappedFun:
      """Produce a new WrappedFun with debug_info attached."""
      assert f.debug_info is None
      if debug_info is None:
          return f
      return WrappedFun(
          f.f, f.transforms, f.stores, f.params, f.in_type, debug_info
      )
  
imports: from __future__ import annotations
  from functools import partial
  import operator
  from typing import Any, Callable, NamedTuple
  import weakref
  from jax._src import config
  from jax._src import core
  from jax._src import traceback_util
  from jax._src.tree_util import tree_map
  from jax._src.util import curry
label_desc: Use image node_id 7 for calling a global function with example usage: add_debug_info(f, debug_info) and returns: WrappedFun, f