code: def test_fit_heterogeneous_clusters(
      example_estimate_competence, create_pool_classifiers
  ):
      clustering_test = DESClustering(
          create_pool_classifiers,
          clustering=KMeans(n_clusters=2),
          pct_accuracy=0.5,
          pct_diversity=0.33,
      )
      X, y = example_estimate_competence[0:2]
  
      clustering_test.clustering.predict = MagicMock(
          return_value=return_cluster_index_ex2
      )
      clustering_test.fit(X, y)
  
      # Index selected should be of any classifier that predicts the label 0
      assert np.isclose(
          clustering_test.performance_cluster_[:, 1],
          [0.428, 0.375],
          atol=0.01,
      ).all()
      assert np.isclose(
          clustering_test.performance_cluster_[:, 0],
          [0.572, 0.625],
          atol=0.01,
      ).all()
      assert (
          clustering_test.indices_[0, 0] == 0
          or clustering_test.indices_[0, 0] == 2
      )
      assert (
          clustering_test.indices_[1, 0] == 0
          or clustering_test.indices_[1, 0] == 2
      )
  
imports: from unittest.mock import MagicMock
  import numpy
  import pytest
  from sklearn.cluster import KMeans
  from sklearn.linear_model import Perceptron
  from sklearn.utils.estimator_checks import check_estimator
  from deslib.des.des_clustering import DESClustering
  from deslib.util.diversity import Q_statistic, ratio_errors, negative_double_fault
label_desc: Use image node_id 3 for calling a global function with example usage: test_fit_heterogeneous_clusters(example_estimate_competence, create_pool_classifiers) without return types