code: def module_auto_repr(enabled: bool) -> bool:
      """Disables automatically generating an implementation of Module.__repr__.
  
      By default, Haiku will automatically generate a useful string representation
      of modules for printing. For example:
  
      >>> print(hk.Linear(1))
      Linear(output_size=1)
  
      In some cases, objects passed into module constructors may be slow to print,
      for example very nested data structures, or you may be rapidly creating and
      throwing away modules (e.g. in a test) and don't want to pay the overhead of
      converting to string.
  
      This config option enables users to disable the automatic repr feature
      globally in Haiku:
  
      >>> previous_value = hk.experimental.module_auto_repr(False)
      >>> print(hk.Linear(1))
      <...Linear object at ...>
  
      >>> previous_value = hk.experimental.module_auto_repr(True)
      >>> print(hk.Linear(1))
      Linear(output_size=1)
  
      To disable the feature on a per-subclass basis assign
      ``AUTO_REPR = False`` as a property on your class, for example:
  
      >>> class NoAutoRepr(hk.Module):
      ...   AUTO_REPR = False
      >>> print(NoAutoRepr())
      <...NoAutoRepr object at ...>
  
      Args:
        enabled: Boolean indicating whether a module should be enabled.
  
      Returns:
        The previous value of this config setting.
      """
      config = get_config()
      previous_value, config.module_auto_repr = (
          config.module_auto_repr,
          enabled,
      )
      return previous_value
  
file_path: dm-haiku/haiku/_src/config.py
imports: import contextlib
  import dataclasses
  import threading
  from typing import Optional
label_desc: Use image node_id 7 for calling a global function with example usage: module_auto_repr(enabled) and returns: previous_value