code: def test_fit_clusters_less_diverse(
      example_estimate_competence, create_pool_classifiers
  ):
      clustering_test = DESClustering(
          create_pool_classifiers * 2,
          clustering=KMeans(n_clusters=2),
          pct_accuracy=0.5,
          pct_diversity=0.33,
          more_diverse=False,
      )
      X, y = example_estimate_competence[0:2]
  
      clustering_test.clustering.predict = MagicMock(return_value=y)
      clustering_test.fit(X, y)
  
      assert (
          clustering_test.performance_cluster_[0, 1] == 0.0
          and clustering_test.performance_cluster_[0, [0, 2]].all()
          == 1.0
      )
      assert (
          clustering_test.performance_cluster_[1, 1] == 1.0
          and clustering_test.performance_cluster_[1, [0, 2]].all()
          == 0.0
      )
      for idx in clustering_test.indices_[0, :]:
          assert idx in (1, 3, 4, 5)
  
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 5 for calling a global function with example usage: test_fit_clusters_less_diverse(example_estimate_competence, create_pool_classifiers) without return types