code: def test_estimate_competence(
      create_pool_classifiers, example_estimate_competence
  ):
      clustering_test = DESClustering(
          create_pool_classifiers * 2,
          clustering=KMeans(n_clusters=2),
          pct_accuracy=0.5,
          pct_diversity=0.33,
      )
  
      X, y = example_estimate_competence[0:2]
      clustering_test.fit(X, y)
      competences = clustering_test.estimate_competence(0)
  
      assert np.array_equal(
          competences, clustering_test.performance_cluster_[0, :]
      )
  
      competences = clustering_test.estimate_competence(1)
      assert np.array_equal(
          competences, clustering_test.performance_cluster_[1, :]
      )
  
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 4 for calling a global function with example usage: test_estimate_competence(create_pool_classifiers, example_estimate_competence) without return types