code: def test_kdn_score(example_estimate_competence):
      X, y, neigh, dist, _, _ = example_estimate_competence
      X, y = X[0:6, :], y[0:6]
      score, _ = kdn_score(X, y, 3)
      assert np.allclose(score, 0.3333333)
  
imports: import numpy
  import pytest
  from deslib.util.instance_hardness import hardness_region_competence
  from deslib.util.instance_hardness import kdn_score
label_desc: Use image node_id 4 for calling a global function with example usage: test_kdn_score(example_estimate_competence) without return types