code: def _unregister_event_duration_listener_by_index(index: int) -> None:
      """Unregister an event duration listener by index.
  
      This function is supposed to be called for testing only.
      """
      size = len(_event_duration_secs_listeners)
      assert -size <= index < size
      del _event_duration_secs_listeners[index]
  
file_path: jax/jax/_src/monitoring.py
imports: from __future__ import annotations
  from typing import Protocol
label_desc: Use image node_id 9 for calling a global function with example usage: _unregister_event_duration_listener_by_index(index) without return types