class_docstr: Context manager that when active adds a new name in the hierarcy.
class_docstr_tok: ["Context","manager","that","when","active","adds","a","new","name","in","the","hierarcy","."]
code: def __enter__(self):
      if self.__stack is None:
          raise ValueError("name_scope is not reusable")
      if self.__entered:
          raise ValueError("name_scope is not reentrant")
      self.__entered = True
      self.__stack.enter_context(
          simulate_module_method(self.__module, self.__method)
      )
  
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 2 for calling the NameScope obj's underlying member method code with example usage: obj.__enter__() without return types