code: def test_fit_hard_voting():
      sampling_strategy = "auto"
      voting = "hard"
      cluster = KMeans(random_state=RND_SEED, n_init=1)
      cc = ClusterCentroids(
          sampling_strategy=sampling_strategy,
          random_state=RND_SEED,
          estimator=cluster,
          voting=voting,
      )
  
      X_resampled, y_resampled = cc.fit_resample(X, Y)
      assert X_resampled.shape == (6, 2)
      assert y_resampled.shape == (6,)
      for x in X_resampled:
          assert np.any(np.all(x == X, axis=1))
  
file_path: imbalanced-learn/imblearn/under_sampling/_prototype_generation/tests/test_cluster_centroids.py
imports: from collections import Counter
  import numpy
  import pytest
  from scipy import sparse
  from sklearn.cluster import KMeans
  from sklearn.datasets import make_classification
  from sklearn.linear_model import LogisticRegression
  from imblearn.under_sampling import ClusterCentroids
  from imblearn.utils.testing import _CustomClusterer
label_desc: Use image node_id 6 for calling a global function with example usage: test_fit_hard_voting() without return types