class_docstr: Mixin enabling time interaction controls.
class_docstr_tok: ["Mixin","enabling","time","interaction","controls","."]
docstr: Toggle time playback.
docstr_tok: ["Toggle","time","playback","."]
code: def _toggle_playback(self, value=None):
      """Toggle time playback."""
      from ..ui_events import TimeChange, publish
  
      if value is None:
          self._playback = not self._playback
      else:
          self._playback = value
  
      if self._playback:
          self._tool_bar_update_button_icon(
              name="play", icon_name="pause"
          )
          if self._current_time_func() == self._times[-1]:  # start over
              publish(self._fig, TimeChange(time=self._times[0]))
          self._last_tick = time.time()
      else:
          self._tool_bar_update_button_icon(
              name="play", icon_name="play"
          )
  
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 4 for calling the _TimeInteraction obj's underlying member method code with example usage: obj._toggle_playback(value) without return types