code: def register_event_listener(
      callback: EventListenerWithMetadata,
  ) -> None:
      """Register a callback to be invoked during record_event()."""
      _event_listeners.append(callback)
  
file_path: jax/jax/_src/monitoring.py
imports: from __future__ import annotations
  from typing import Protocol
label_desc: Use image node_id 3 for calling a global function with example usage: register_event_listener(callback) without return types