code: def test_switch_picking_type():
      pl = pv.Plotter()
      width, height = pl.window_size
      pl.add_mesh(pv.Sphere())
  
      cells = []
  
      def callback(picked):
          cells.append(picked)
  
      pl.enable_cell_picking(callback=callback)
      with pytest.raises(PyVistaPickingError):
          pl.enable_point_picking()
  
      pl.show(auto_close=False, interactive=False)
      pl.iren._simulate_keypress("r")
      pl.iren._mouse_left_button_press(width // 4, height // 4)
      pl.iren._mouse_left_button_release(width, height)
  
      assert cells
      assert isinstance(cells[0], pv.UnstructuredGrid)
      assert pl.picked_cells is not None
  
      # Now switch to point picking
      pl.disable_picking()
  
      points = []
  
      def callback(click_point):
          points.append(click_point)
  
      pl.enable_point_picking(callback=callback)
      # simulate the pick
      width, height = pl.window_size
  
      pl.iren._mouse_right_button_click(width // 3, height // 2)
  
      pl.close()
  
      assert points
      assert len(points[0]) == 3
  
imports: import os
  import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista.plotting.errors import PyVistaPickingError
label_desc: Use image node_id 19 for calling a global function with example usage: test_switch_picking_type() without return types