code: def test_compute_meta_features(
      example_estimate_competence, create_pool_classifiers
  ):
      (
          X,
          y,
          nn,
          _,
          dsel_processed,
          dsel_scores,
      ) = example_estimate_competence
  
      query = np.ones((1, 2))
      pool = create_pool_classifiers
      meta_test = METADES(pool_classifiers=[pool[0]])
      meta_test.n_classifiers_ = 1
      meta_test.k_ = 7
      meta_test.Kp_ = 5
      # Considering only one classifier in the pool (index = 0)
      meta_test.DSEL_processed_ = dsel_processed[:, 0].reshape(-1, 1)
      meta_test.dsel_scores_ = dsel_scores[:, 0, :].reshape(15, 1, 2)
      meta_test.DSEL_target_ = y
      meta_test.n_classes_ = 2
  
      neighbors_op = nn[2, 0 : meta_test.Kp]
  
      # Expected values for each meta feature based on the data of ex1.
      expected_f1 = [1.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0]
      expected_f2 = [1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0]
      expected_f3 = [4.0 / 7.0]
      expected_f4 = [0.0, 1.0, 1.0, 1.0, 0.0]
      expected_f5 = [0.5]
  
      scores = np.empty(
          (
              query.shape[0],
              meta_test.n_classifiers_,
              meta_test.n_classes_,
          )
      )
      for index, clf in enumerate(meta_test.pool_classifiers):
          scores[:, index, :] = clf.predict_proba(query)
  
      meta_features = meta_test.compute_meta_features(
          scores, nn[0, :], neighbors_op
      )
      expected = np.asarray(
          expected_f1
          + expected_f2
          + expected_f3
          + expected_f4
          + expected_f5
      )
      assert np.array_equal(meta_features, expected.reshape(1, -1))
  
imports: from unittest.mock import MagicMock
  import numpy
  import pytest
  from sklearn.linear_model import Perceptron
  from sklearn.naive_bayes import GaussianNB
  from sklearn.svm import SVC
  from sklearn.utils.estimator_checks import check_estimator
  from sklearn.utils.validation import check_is_fitted
  from deslib.des.meta_des import METADES
label_desc: Use image node_id 8 for calling a global function with example usage: test_compute_meta_features(example_estimate_competence, create_pool_classifiers) without return types