code: def test_set_active_scalars_multi(multiblock_poly):
      multiblock_poly.set_active_scalars(None)
  
      block = multiblock_poly[0]
      block.point_data.set_array(range(block.n_points), "data")
      block.cell_data.set_array(range(block.n_cells), "data")
  
      block = multiblock_poly[1]
      block.point_data.set_array(range(block.n_points), "data")
  
      multiblock_poly.set_active_scalars(
          "data", preference="point", allow_missing=True
      )
      for block in multiblock_poly:
          if "data" in block.point_data:
              assert block.point_data.active_scalars_name == "data"
          else:
              assert block.point_data.active_scalars_name is None
  
      multiblock_poly.set_active_scalars(
          "data", preference="cell", allow_missing=True
      )
      for block in multiblock_poly:
          if "data" in block.cell_data:
              assert block.cell_data.active_scalars_name == "data"
          else:
              assert block.cell_data.active_scalars_name is None
  
imports: import pathlib
  import platform
  import weakref
  import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista import ImageData, MultiBlock, PolyData, RectilinearGrid, StructuredGrid, examples
label_desc: Use image node_id 35 for calling a global function with example usage: test_set_active_scalars_multi(multiblock_poly) without return types