code: def _to_callable(f: Callable[..., T]) -> Callable[..., T]:
      """Enapsulates the given callable inside a lambda."""
      # Prevents us from leaking methods other than __call__ on `f`.
      return lambda *a, **k: f(*a, **k)
  
imports: from collections.abc import Mapping, MutableMapping
  import functools
  from typing import Any, Callable, Optional, TypeVar
  from haiku._src import base
  from haiku._src import data_structures
  from haiku._src import module
  from haiku._src import transform
  from haiku._src.typing import LiftingModuleType
label_desc: Use image node_id 7 for calling a global function with example usage: _to_callable(f) and returns: function