code: def test_region_assigner_with_ignore(self):
      region_assigner = RegionAssigner(center_ratio=0.5)
      priors = torch.FloatTensor(
          [
              [0, 0, 10, 10],
              [10, 10, 20, 20],
              [5, 5, 15, 15],
              [30, 32, 40, 42],
          ]
      )
      valid_flags = torch.BoolTensor([1, 1, 1, 1])
      gt_bboxes = torch.FloatTensor(
          [
              [0, 0, 10, 9],
              [0, 10, 10, 19],
          ]
      )
      gt_labels = torch.LongTensor([2, 3])
      gt_bboxes_ignore = torch.Tensor(
          [
              [30, 30, 40, 40],
          ]
      )
  
      pred_instances = InstanceData(
          priors=priors, valid_flags=valid_flags
      )
      gt_instances = InstanceData(bboxes=gt_bboxes, labels=gt_labels)
      gt_instances_ignore = InstanceData(bboxes=gt_bboxes_ignore)
      num_level_anchors = [4]
      with self.assertRaises(NotImplementedError):
          region_assigner.assign(
              pred_instances,
              gt_instances,
              self.img_meta,
              self.featmap_sizes,
              num_level_anchors,
              self.anchor_scale,
              self.anchor_strides,
              gt_instances_ignore=gt_instances_ignore,
          )
  
file_path: mmdetection/tests/test_models/test_task_modules/test_assigners/test_region_assigner.py
imports: from unittest import TestCase
  import torch
  from mmengine.config import ConfigDict
  from mmengine.structures import InstanceData
  from mmdet.models.task_modules.assigners import RegionAssigner
label_desc: Use image node_id 3 for calling the TestRegionAssigner obj's underlying member method code with example usage: obj.test_region_assigner_with_ignore() without return types