code: def _unregister_event_listener_by_callback(
      callback: EventListenerWithMetadata,
  ) -> None:
      """Unregister an event listener by callback.
  
      This function is supposed to be called for testing only.
      """
      assert callback in _event_listeners
      _event_listeners.remove(callback)
  
file_path: jax/jax/_src/monitoring.py
imports: from __future__ import annotations
  from typing import Protocol
label_desc: Use image node_id 10 for calling a global function with example usage: _unregister_event_listener_by_callback(callback) without return types