code: def current_policy() -> Optional[jmp.Policy]:
      """Retrieves the currently active policy in the current context.
  
      Returns:
        The currently active mixed precision policy, or ``None``.
  
      See also:
        - :func:`clear_policy`: Clears any policies associated with a class.
        - :func:`get_policy`: Gets the policy for a given class.
        - :func:`set_policy`: Sets a policy for a given class.
        - :func:`push_policy`: Context manager for setting policies.
      """
      tls = _thread_local_state
      return tls.current_policy if tls.has_current_policy else None
  
imports: import collections
  import contextlib
  import threading
  from typing import TypeVar, Optional, Union
  from haiku._src import base
  from haiku._src import data_structures
  from haiku._src import module
  import jmp
label_desc: Use image node_id 3 for calling a global function with example usage: current_policy() and returns: unknown