code: def _parse_interaction_event(interaction_event):
      """Parse the interaction event.
  
      Parameters
      ----------
      interaction_event : vtk.vtkCommand.EventIds, str, optional
          The VTK interaction event to use for triggering the callback. Accepts
          either the strings ``'start'``, ``'end'``, ``'always'`` or a
          ``vtk.vtkCommand.EventIds``.
  
      Returns
      -------
      vtk.vtkCommand.EventIds
          VTK Event type.
  
      """
      if interaction_event == "start":
          interaction_event = _vtk.vtkCommand.StartInteractionEvent
      elif interaction_event == "end":
          interaction_event = _vtk.vtkCommand.EndInteractionEvent
      elif interaction_event == "always":
          interaction_event = _vtk.vtkCommand.InteractionEvent
      elif isinstance(interaction_event, str):
          raise ValueError(
              "Expected value for `interaction_event` is 'start', "
              f"'end', or 'always'. {interaction_event} was given."
          )
      elif not isinstance(interaction_event, _vtk.vtkCommand.EventIds):
          raise TypeError(
              "Expected type for `interaction_event` is either a str "
              "or an instance of `vtk.vtkCommand.EventIds`."
              f" ({type(interaction_event)}) was given."
          )
      return interaction_event
  
imports: import pathlib
  from typing import Optional, Sequence, Tuple, Union
  import numpy
  import pyvista
  from pyvista.core.utilities.arrays import get_array, get_array_association
  from pyvista.core.utilities.geometric_objects import NORMALS
  from pyvista.core.utilities.helpers import generate_plane
  from pyvista.core.utilities.misc import assert_empty_kwargs, try_callback
  from .None import _vtk
  from .affine_widget import AffineWidget3D
  from .colors import Color
  from .opts import PickerType
  from .utilities.algorithms import add_ids_algorithm, algorithm_to_mesh_handler, crinkle_algorithm, outline_algorithm, pointset_to_polydata_algorithm, set_algorithm_input
label_desc: Use image node_id 1 for calling a global function with example usage: _parse_interaction_event(interaction_event) and returns: interaction_event