code: def test_estimate_competence_batch():
      n_samples = 10
      query = np.ones((n_samples, 2))
      probabilistic_test = BaseProbabilistic()
      probabilistic_test.k_ = 7
      distances = np.tile([0.5, 1.0, 2.0], (n_samples, 1))
      neighbors = np.tile([0, 1, 2], (n_samples, 1))
  
      probabilistic_test.C_src_ = np.array(
          [[0.5, 0.2, 0.8], [1.0, 1.0, 1.0], [1.0, 0.6, 0.3]]
      )
      expected = np.tile([0.665, 0.458, 0.855], (n_samples, 1))
      competence = probabilistic_test.estimate_competence(
          competence_region=neighbors, distances=distances
      )
      assert np.allclose(competence, expected, atol=0.01)
  
imports: import numpy
  import pytest
  from sklearn.linear_model import Perceptron
  from sklearn.utils.estimator_checks import check_estimator
  from deslib.des.probabilistic import BaseProbabilistic, Logarithmic, Exponential, RRC, DESKL, MinimumDifference
label_desc: Use image node_id 14 for calling a global function with example usage: test_estimate_competence_batch() without return types