code: def raise_not_matching(scalars, dataset):
      """Raise exception about inconsistencies.
  
      Parameters
      ----------
      scalars : numpy.ndarray
          Array of scalars.
  
      dataset : pyvista.DataSet
          Dataset to check against.
  
      Raises
      ------
      ValueError
          Raises a ValueError if the size of scalars does not the dataset.
      """
      if isinstance(dataset, _vtk.vtkTable):
          raise ValueError(
              f"Number of scalars ({scalars.shape[0]}) must match number of rows ({dataset.n_rows})."
          )
      raise ValueError(
          f"Number of scalars ({scalars.shape[0]}) "
          f"must match either the number of points ({dataset.n_points}) "
          f"or the number of cells ({dataset.n_cells})."
      )
  
imports: import collections.abc
  import enum
  from itertools import product
  from typing import Optional, Tuple, Union
  import numpy
  import pyvista
  from pyvista.core import _vtk_core
  from pyvista.core._typing_core import Matrix, NumpyArray, TransformLike, Vector
  from pyvista.core.errors import AmbiguousDataError, MissingDataError
label_desc: Use image node_id 9 for calling a global function with example usage: raise_not_matching(scalars, dataset) without return types