code: def test_generate_thr_map(self):
      data_sample = self.data_samples[0]
      text_polys = data_sample.gt_instances.polygons[:2]
      thr_map, _ = self.db_loss._generate_thr_map(
          data_sample.img_shape, text_polys
      )
      assert np.all((thr_map >= 0.29) * (thr_map <= 0.71))
  
file_path: mmocr/tests/test_models/test_textdet/test_module_losses/test_db_module_loss.py
imports: from unittest import TestCase
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmocr.models.textdet.module_losses import DBModuleLoss
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 4 for calling the TestDBModuleLoss obj's underlying member method code with example usage: obj.test_generate_thr_map() without return types