code: def test_max_iou_assigner_with_empty_priors():
      """Test corner case where a network might predict no boxes."""
      self = MaxIoUAssigner(
          pos_iou_thr=0.5,
          neg_iou_thr=0.5,
      )
      priors = torch.empty((0, 4))
      gt_bboxes = torch.FloatTensor(
          [
              [0, 0, 10, 9],
              [0, 10, 10, 19],
          ]
      )
      gt_labels = torch.LongTensor([2, 3])
  
      pred_instances = InstanceData(priors=priors)
      gt_instances = InstanceData(bboxes=gt_bboxes, labels=gt_labels)
      # Test with gt_labels
      assign_result = self.assign(pred_instances, gt_instances)
      assert len(assign_result.gt_inds) == 0
      assert tuple(assign_result.labels.shape) == (0,)
  
file_path: mmdetection/tests/test_models/test_task_modules/test_assigners/test_max_iou_assigner.py
imports: import pytest
  import torch
  from mmengine.structures import InstanceData
  from mmdet.models.task_modules.assigners import MaxIoUAssigner
label_desc: Use image node_id 4 for calling a global function with example usage: test_max_iou_assigner_with_empty_priors() without return types