code: def test_instance_hardness_region(
      index, expected, example_estimate_competence
  ):
      y, neighbors = example_estimate_competence[1:3]
      k = 7
      neighbors = neighbors[index, :]
      IH = hardness_region_competence(neighbors, y, k)
      assert np.isclose(IH, expected, atol=0.01)
  
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 1 for calling a global function with example usage: test_instance_hardness_region(index, expected, example_estimate_competence) without return types