code: def hook_methods(method_hook: MethodHook) -> ContextManager[None]:
      """Context manager that registers a given module method_hook."""
      return method_hook_stack(method_hook)
  
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 16 for calling a global function with example usage: hook_methods(method_hook) and returns: method_hook_stack