code: def test_predict_proba_instance_called(
      index, example_estimate_competence, create_pool_classifiers
  ):
      X, y, neighbors, distances, _, _ = example_estimate_competence
      query = np.atleast_2d([1, 1])
      ds_test = BaseDS(
          create_pool_classifiers, with_IH=True, IH_rate=0.10
      )
      ds_test.fit(X, y)
  
      neighbors = neighbors[index, :]
      distances = distances[index, :]
  
      ds_test.get_competence_region = MagicMock(
          return_value=(distances, neighbors)
      )
  
      ds_test.predict_proba_with_ds = MagicMock(
          return_value=np.atleast_2d([0.25, 0.75])
      )
      proba = ds_test.predict_proba(query)
      assert np.allclose(proba, np.atleast_2d([0.25, 0.75]))
  
imports: import unittest.mock
  from unittest.mock import Mock, MagicMock
  import numpy
  import pytest
  from sklearn.exceptions import NotFittedError
  from sklearn.neighbors import KNeighborsClassifier
  from deslib.base import BaseDS
  from deslib.util.dfp import frienemy_pruning_preprocessed
  from .conftest import create_base_classifier
label_desc: Use image node_id 24 for calling a global function with example usage: test_predict_proba_instance_called(index, example_estimate_competence, create_pool_classifiers) without return types