code: def _validate_center_shape(X, n_centers, centers):
      """Check if centers is compatible with X and n_centers"""
      if len(centers) != n_centers:
          raise ValueError(
              "The shape of the initial centers (%s) "
              "does not match the number of clusters %i"
              % (centers.shape, n_centers)
          )
      if centers.shape[1] != X.shape[1]:
          raise ValueError(
              "The number of features of the initial centers %s "
              "does not match the number of features of the data %s."
              % (centers.shape[1], X.shape[1])
          )
  
imports: import warnings
  import numpy
  import scipy.sparse
  from ..base import BaseEstimator, ClusterMixin, TransformerMixin
  from ..metrics.pairwise import euclidean_distances
  from ..metrics.pairwise import pairwise_distances_argmin_min
  from ..utils.extmath import row_norms, squared_norm
  from ..utils.sparsefuncs_fast import assign_rows_csr
  from ..utils.sparsefuncs import mean_variance_axis
  from ..utils.fixes import astype
  from ..utils import check_array
  from ..utils import check_random_state
  from ..utils import as_float_array
  from ..utils import gen_batches
  from ..utils.validation import check_is_fitted
  from ..utils.validation import FLOAT_DTYPES
  from ..utils.random import choice
  from ..externals.joblib import Parallel
  from ..externals.joblib import delayed
  from ..externals.six import string_types
  from .None import _k_means
  from ._k_means_elkan import k_means_elkan
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_center_shape(X, n_centers, centers) without return types