code: def _check_shape(param, param_shape, name):
      """Validate the shape of the input parameter 'param'.
  
      Parameters
      ----------
      param : array
  
      param_shape : tuple
  
      name : str
      """
      param = np.array(param)
      if param.shape != param_shape:
          raise ValueError(
              "The parameter '%s' should have the shape of %s, but got %s"
              % (name, param_shape, param.shape)
          )
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from numbers import Integral, Real
  from time import time
  import numpy
  from scipy.special import logsumexp
  from ..None import cluster
  from ..base import BaseEstimator, DensityMixin, _fit_context
  from ..cluster import kmeans_plusplus
  from ..exceptions import ConvergenceWarning
  from ..utils import check_random_state
  from ..utils._param_validation import Interval, StrOptions
  from ..utils.validation import check_is_fitted
label_desc: Use image node_id 1 for calling a global function with example usage: _check_shape(param, param_shape, name) without return types