code: def _daal4py_check_test_data(self, X):
      if sklearn_check_version("1.0"):
          self._check_feature_names(X, reset=False)
      X = check_array(
          X,
          accept_sparse="csr",
          dtype=[np.float64, np.float32],
          accept_large_sparse=False,
      )
      if self.n_features_in_ != X.shape[1]:
          raise ValueError(
              (
                  f"X has {X.shape[1]} features, "
                  f"but Kmeans is expecting {self.n_features_in_} features as input"
              )
          )
      return X
  
imports: import numbers
  import warnings
  import numpy
  from scipy import sparse
  from sklearn.cluster import KMeans
  from sklearn.cluster._kmeans import _labels_inertia
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.utils import check_array, check_random_state
  from sklearn.utils._openmp_helpers import _openmp_effective_n_threads
  from sklearn.utils.extmath import row_norms
  from sklearn.utils.sparsefuncs import mean_variance_axis
  from sklearn.utils.validation import _deprecate_positional_args, _num_samples, check_is_fitted
  import daal4py
  from .._device_offload import support_usm_ndarray
  from .._utils import PatchingConditionsChain, control_n_jobs, getFPType, run_with_n_jobs, sklearn_check_version
label_desc: Use image node_id 8 for calling a global function with example usage: _daal4py_check_test_data(X) and returns: X