code: def get_num_traces(fn) -> int:
      """Given a function wrapped in [`equinox.debug.assert_max_traces`][], return the
      number of times which it has been traced so far.
      """
      num_traces = _get_num_traces(fn)
      if num_traces is None:
          raise ValueError(
              f"{fn} does not appear to wrapped with `eqx.debug.assert_max_traces`"
          )
      return num_traces
  
imports: import functools
  import inspect
  import weakref
  from collections.abc import Callable
  from typing import Optional, overload, TypeVar
  from typing_extensions import ParamSpec
  from .._custom_types import sentinel
  from .._eval_shape import filter_eval_shape
  from .._module import field, Module, module_update_wrapper
  from .._pretty_print import tree_pformat
  from .._tree import tree_equal
label_desc: Use image node_id 4 for calling a global function with example usage: get_num_traces(fn) and returns: num_traces