code: def test_estimate_competence_batch(
      example_estimate_competence, create_pool_classifiers
  ):
      (
          _,
          y,
          nn,
          _,
          dsel_processed,
          dsel_scores,
      ) = example_estimate_competence
  
      query = np.ones((3, 1))
      meta_test = METADES(pool_classifiers=create_pool_classifiers)
      meta_test.n_classifiers_ = 3
      n_meta_features = 21
      meta_test.meta_classifier_ = GaussianNB
      # Set the state of the system which is set by the fit method.
      meta_test.DSEL_processed_ = dsel_processed
      meta_test.dsel_scores_ = dsel_scores
      meta_test.DSEL_target_ = y
      nn = nn
  
      meta_test._get_similar_out_profiles = MagicMock(
          return_value=(None, nn[:, 0 : meta_test.Kp])
      )
      meta_test.compute_meta_features = MagicMock(
          return_value=np.ones((9, n_meta_features))
      )
      meta_test.meta_classifier_.predict_proba = MagicMock(
          return_value=np.tile([0.0, 0.8], (9, 1))
      )
  
      probabilities = []
      for clf in meta_test.pool_classifiers:
          probabilities.append(clf.predict_proba(query))
  
      probabilities = np.array(probabilities).transpose((1, 0, 2))
  
      expected = np.ones((3, 3)) * 0.8
      competences = meta_test.estimate_competence_from_proba(
          query, nn, probabilities
      )
      assert np.array_equal(competences, expected)
  
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 10 for calling a global function with example usage: test_estimate_competence_batch(example_estimate_competence, create_pool_classifiers) without return types