code: def test_fit(example_estimate_competence, create_pool_classifiers):
      X, y = example_estimate_competence[0:2]
  
      knop_test = KNOP(create_pool_classifiers)
      knop_test.fit(X, y)
      expected_scores = np.array([[0.5, 0.5], [1.0, 0.0], [0.33, 0.67]])
      expected_scores = np.tile(expected_scores, (15, 1, 1))
  
      assert np.array_equal(expected_scores, knop_test.dsel_scores_)
  
      # Assert the roc_algorithm_ is fitted to the scores (decision space)
      # rather than the features (feature space)
      expected_roc_data = knop_test.dsel_scores_[:, :, 0]
      assert np.array_equal(knop_test.op_knn_._fit_X, expected_roc_data)
  
file_path: DESlib/deslib/tests/des/test_knop.py
imports: from unittest.mock import Mock
  import numpy
  import pytest
  from sklearn.linear_model import Perceptron
  from sklearn.utils.estimator_checks import check_estimator
  from deslib.des.knop import KNOP
label_desc: Use image node_id 4 for calling a global function with example usage: test_fit(example_estimate_competence, create_pool_classifiers) without return types