code: def _create_panoptic_data_samples(self):
      # predictions
      # TP for background class, IoU=3576/4324=0.827
      # 2 the category id of the background class
      pred = np.zeros((60, 80), dtype=np.int64) + 2
      pred_bboxes = np.array(
          [
              [11, 11, 10, 40],  # TP IoU=351/449=0.78
              [38, 10, 10, 40],  # FP
              [51, 10, 10, 5],  # TP IoU=45/55=0.818
          ],
          dtype=np.int64,
      )
      pred_labels = np.array([0, 0, 1], dtype=np.int64)
      for i in range(3):
          x, y, w, h = pred_bboxes[i]
          pred[y : y + h, x : x + w] = (
              i + 1
          ) * INSTANCE_OFFSET + pred_labels[i]
  
      data_samples = [
          {
              "img_id": 0,
              "ori_shape": (60, 80),
              "img_path": "xxx/fake_name1.jpg",
              "segments_info": [
                  {"id": 1, "category": 0, "is_thing": 1},
                  {"id": 2, "category": 0, "is_thing": 1},
                  {"id": 3, "category": 1, "is_thing": 1},
                  {"id": 4, "category": 2, "is_thing": 0},
              ],
              "seg_map_path": osp.join(
                  self.gt_seg_dir, "fake_name1.png"
              ),
              "pred_panoptic_seg": {
                  "sem_seg": torch.from_numpy(pred).unsqueeze(0)
              },
          }
      ]
  
      return data_samples
  
file_path: mmdetection/tests/test_evaluation/test_metrics/test_coco_panoptic_metric.py
imports: import os
  import os.path
  import tempfile
  import unittest
  from copy import deepcopy
  import mmcv
  import numpy
  import torch
  from mmengine.fileio import dump
  from mmdet.evaluation import INSTANCE_OFFSET, CocoPanopticMetric
label_desc: Use image node_id 2 for calling the TestCocoPanopticMetric obj's underlying member method code with example usage: obj._create_panoptic_data_samples() and returns: data_samples