code: def module_update_wrapper(
      wrapper: Module, wrapped: Optional[Callable[_P, _T]] = None
  ) -> Callable[_P, _T]:
      """Like `functools.update_wrapper` (or its better-known cousin, `functools.wraps`),
      but acts on [`equinox.Module`][]s, and does not modify its input (it returns the
      updated module instead).
  
      !!! Example
  
          ```python
          class Wrapper(eqx.Module):
              fn: Callable
  
              def __call__(self, *args, **kwargs):
                  return self.fn(*args, **kwargs)
  
              @property
              def __wrapped__(self):
                  return self.fn
  
          def make_wrapper(fn):
              return eqx.module_update_wrapper(Wrapper(fn))
          ```
  
      For example, [`equinox.filter_jit`][] returns a module representing the JIT'd
      computation. `module_update_wrapper` is used on this module to indicate that this
      JIT'd computation wraps the original one. (Just like how `functools.wraps` is used.)
  
      Note that as in the above example, the wrapper class must supply a `__wrapped__`
      property, which redirects to the wrapped object.
  
      **Arguments:**
  
      - `wrapper`: the instance of the wrapper.
      - `wrapped`: optional, the callable that is being wrapped. If omitted then
          `wrapper.__wrapped__` will be used.
  
      **Returns:**
  
      A copy of `wrapper`, with the attributes `__module__`, `__name__`, `__qualname__`,
      `__doc__`, and `__annotations__` copied over from the wrapped function.
      """
      return _module_update_wrapper(wrapper, wrapped, inplace=False)
  
imports: import abc
  import dataclasses
  import functools
  import inspect
  import types
  import warnings
  import weakref
  from collections.abc import Callable
  from typing import Any, cast, Optional, Protocol, TYPE_CHECKING, TypeVar, Union
  from typing_extensions import dataclass_transform, ParamSpec
  import jax._src.traceback_util
  import jax.tree_util
  import numpy
  from jaxtyping import Array, Bool, PyTreeDef
  from ._better_abstract import ABCMeta, dataclass
  from ._caches import internal_lru_caches
  from ._doc_utils import doc_repr
  from ._pretty_print import tree_pformat
  from ._tree import tree_equal
label_desc: Use image node_id 10 for calling a global function with example usage: module_update_wrapper(wrapper, wrapped) and returns: _module_update_wrapper