code: def named_call(class_fn, force=True):
      """Labels a method for labelled traces in profiles.
  
      Note that it is better to use the `jax.named_scope` context manager directly
      to add names to JAX's metadata name stack.
  
      Args:
        class_fn: The class method to label.
        force: If True, the named_call transform is applied even if it is globally
          disabled. (e.g.: by calling `flax.linen.disable_named_call()`)
      Returns:
        A wrapped version of ``class_fn`` that is labeled.
      """
  
      # We use JAX's dynamic name-stack named_call. No transform boundary needed!
      @functools.wraps(class_fn)
      def wrapped_fn(self, *args, **kwargs):
          if (
              not force and not linen_module._use_named_call
          ) or self._state.in_setup:  # pylint: disable=protected-access  # pylint: disable=protected-access
              return class_fn(self, *args, **kwargs)
          full_name = _derive_profiling_name(self, class_fn)
          return jax.named_call(class_fn, name=full_name)(
              self, *args, **kwargs
          )
  
      return wrapped_fn
  
imports: import dataclasses
  import functools
  import inspect
  from typing import Any, Callable, Dict, Iterable, Mapping, Optional, Sequence, Tuple, Type, TypeVar, Union
  from flax import errors, struct, traceback_util
  from flax.core import Scope, lift, meta
  from flax.core.frozen_dict import FrozenDict
  from flax.linen import module
  from flax.linen.module import Module, Variable, _derive_profiling_name, _get_unbound_fn, wrap_method_once
  import jax
label_desc: Use image node_id 28 for calling a global function with example usage: named_call(class_fn, force) and returns: wrapped_fn, jax, class_fn