code: def test_set_active_scalars_components(multiblock_poly):
      multiblock_poly[0].point_data["data"] = range(
          multiblock_poly[0].n_points
      )
      multiblock_poly[1].point_data["data"] = range(
          multiblock_poly[1].n_points
      )
      multiblock_poly[2].point_data["data"] = range(
          multiblock_poly[2].n_points
      )
  
      multiblock_poly.set_active_scalars(None)
      multiblock_poly.set_active_scalars("data")
      for block in multiblock_poly:
          assert block.point_data.active_scalars_name == "data"
  
      data = np.zeros((multiblock_poly[2].n_points, 3))
      multiblock_poly[2].point_data["data"] = data
      with pytest.raises(ValueError, match="Inconsistent dimensions"):
          multiblock_poly.set_active_scalars("data")
  
      data = np.arange(multiblock_poly[2].n_points, dtype=np.complex128)
      multiblock_poly[2].point_data["data"] = data
      with pytest.raises(
          ValueError, match="Inconsistent complex and real"
      ):
          multiblock_poly.set_active_scalars("data")
  
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 36 for calling a global function with example usage: test_set_active_scalars_components(multiblock_poly) without return types