code: def test_classify_with_ds_batch_samples():
      n_samples = 10
  
      # simulated predictions of the pool of classifiers
      predictions = np.tile(np.array([0, 1, 0]), (n_samples, 1))
  
      desmi_test = DESMI()
      desmi_test.n_classes_ = 2
      desmi_test.estimate_competence = MagicMock(
          return_value=(np.ones((n_samples, 3)))
      )
      desmi_test.select = MagicMock(
          return_value=np.tile(np.array([[0, 2]]), (n_samples, 1))
      )
      result = desmi_test.classify_with_ds(predictions)
      assert np.allclose(result, np.zeros(10))
  
file_path: DESlib/deslib/tests/des/test_des_mi.py
imports: from unittest.mock import MagicMock
  import numpy
  import pytest
  from sklearn.linear_model import Perceptron
  from sklearn.utils.estimator_checks import check_estimator
  from deslib.des.des_mi import DESMI
label_desc: Use image node_id 8 for calling a global function with example usage: test_classify_with_ds_batch_samples() without return types