class_docstr: Mixin enabling time interaction controls.
class_docstr_tok: ["Mixin","enabling","time","interaction","controls","."]
docstr: Respond to time_change UI event.
docstr_tok: ["Respond","to","time_change","UI","event","."]
code: def _on_time_change(self, event):
      """Respond to time_change UI event."""
      from ..ui_events import disable_ui_events
  
      new_time = np.clip(event.time, self._times[0], self._times[-1])
      new_time_idx = np.interp(
          new_time, self._times, np.arange(len(self._times))
      )
  
      with disable_ui_events(self._fig):
          self._widgets["time_slider"].set_value(new_time_idx)
          self._widgets["current_time"].set_value(f"{new_time:.3f}")
  
imports: import importlib
  import time
  from contextlib import contextmanager
  from functools import partial
  import numpy
  from ...utils import _auto_weakref, _check_option, _validate_type, fill_doc, get_config, logger, verbose
  from .._3d import _get_3d_option
  from ..utils import safe_event
  from ._utils import VALID_3D_BACKENDS
label_desc: Use image node_id 2 for calling the _TimeInteraction obj's underlying member method code with example usage: obj._on_time_change(event) without return types