code: def test_multi_cell_picking(through):
      cube = pv.Cube()
  
      # Test with algorithm source to make sure connections work with picking
      src = vtk.vtkSphereSource()
      src.SetCenter((1, 0, 0))
      mapper = vtk.vtkDataSetMapper()
      mapper.SetInputConnection(src.GetOutputPort())
      actor = vtk.vtkActor()
      actor.SetMapper(mapper)
      actor.SetPickable(True)
  
      plotter = pv.Plotter(window_size=(1024, 768))
      plotter.add_mesh(cube, pickable=True)
      plotter.add_actor(actor)
      plotter.enable_cell_picking(
          color="blue",
          through=through,
          start=True,
          show=True,
          show_frustum=True,
      )
      plotter.show(auto_close=False)  # must start renderer first
  
      # simulate the pick (169, 113, 875, 684)
      plotter.iren._mouse_left_button_press(169, 113)
      plotter.iren._mouse_move(875, 684)
      plotter.iren._mouse_left_button_release()
  
      assert plotter.get_pick_position() == (169, 113, 875, 684)
  
      plotter.close()
  
      assert isinstance(plotter.picked_cells, pv.MultiBlock)
      # Selection should return 2 submeshes
      assert len(plotter.picked_cells) == 2
  
      merged = plotter.picked_cells.combine()
      n_sphere_cells = pv.wrap(src.GetOutput()).n_cells
      if through:
          # all cells should have been selected
          assert merged.n_cells == cube.n_cells + n_sphere_cells
      else:
          assert merged.n_cells < cube.n_cells + n_sphere_cells
  
imports: import os
  import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista.plotting.errors import PyVistaPickingError
label_desc: Use image node_id 2 for calling a global function with example usage: test_multi_cell_picking(through) without return types