code: def force_name(name: str) -> str:
      """Forces Haiku to use this name, ignoring all context information.
  
      NOTE: This method is intended for advanced use cases only and should be
      avoided whenever possible as it effectively enforces a singleton pattern when
      setting absolute names.
  
      Haiku names modules according to where they are created (e.g. the stack of
      modules that created them, or the current :func:`~haiku.name_scope`). This
      function allows you to create modules that ignore all of this and have
      precisely the name you provide.
  
      This might be useful in the case that you have two modules and you want to
      force them to share parameters:
  
      >>> mod0 = hk.Linear(1)
      >>> some_hyperparameter = True
      >>> if some_hyperparameter:
      ...   # Force mod1 and mod0 to have shared weights.
      ...   mod1 = hk.Linear(1, name=hk.force_name(mod0.module_name))
      ... else:
      ...   # mod0 and mod1 are independent.
      ...   mod1 = hk.Linear(1)
  
      (A simpler version of this snippet would do `mod1 = mod0` instead of using
      force_name, however in real examples it can be simpler to use force_name,
      especially in cases where you may not have access to the module instance
      without lots of plumbing, but getting the module name is easy [e.g. it is a
      hyperparameter]).
  
      Args:
        name: String name for the module. For example ``"foo"`` or ``"foo/bar"``.
  
      Returns:
        A value suitable to pass into the ``name`` argument of any Haiku module
        constructor.
      """
      return f"{OVERRIDE_PREFIX}{name}"
  
imports: from collections.abc import Mapping
  import contextlib
  import functools
  import inspect
  import re
  from typing import Any, Callable, ContextManager, NamedTuple, Optional, Protocol, TypeVar
  from haiku._src import base
  from haiku._src import config
  from haiku._src import data_structures
  from haiku._src import utils
  import jax
  import jax.numpy
label_desc: Use image node_id 11 for calling a global function with example usage: force_name(name) and returns: OVERRIDE_PREFIX, name