code: def test_predict_proba_weighting_hard_voting(create_pool_classifiers):
      query = np.array([[-1, 1]])
      expected = np.array([0.4117, 0.5883])
      competences = np.array([[0.5, 1.0, 0.2]])
      predictions = np.array([[0, 1, 0]])
      pool_classifiers = create_pool_classifiers
  
      des_test = BaseDES(
          pool_classifiers, mode="weighting", voting="hard"
      )
      des_test.estimate_competence = MagicMock(return_value=competences)
      des_test.n_classes_ = 2
  
      predicted_proba = des_test.predict_proba_with_ds(predictions)
      assert np.isclose(predicted_proba, expected, atol=0.01).all()
  
file_path: DESlib/deslib/tests/des/test_base.py
imports: from unittest.mock import MagicMock
  import numpy
  import pytest
  from deslib.des.base import BaseDES
label_desc: Use image node_id 10 for calling a global function with example usage: test_predict_proba_weighting_hard_voting(create_pool_classifiers) without return types