code: def test_instance_hardness_region_batch(example_estimate_competence):
      expected = np.array([0.42, 0.28, 0.28])
      y, neighbors = example_estimate_competence[1:3]
  
      k = 7
      IH = hardness_region_competence(neighbors, y, k)
      assert np.allclose(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 2 for calling a global function with example usage: test_instance_hardness_region_batch(example_estimate_competence) without return types