code: def _create_panoptic_data(num_boxes, h, w):
      sem_seg = np.zeros((h, w), dtype=np.int64) + 2
      bboxes = _rand_bboxes(num_boxes, h, w).int()
      labels = torch.randint(2, (num_boxes,))
      for i in range(num_boxes):
          x, y, w, h = bboxes[i]
          sem_seg[y : y + h, x : x + w] = (
              i + 1
          ) * INSTANCE_OFFSET + labels[i]
  
      return sem_seg[None]
  
imports: import os
  from unittest import TestCase
  import cv2
  import numpy
  import torch
  from mmengine.structures import InstanceData, PixelData
  from mmdet.evaluation import INSTANCE_OFFSET
  from mmdet.structures import DetDataSample
  from mmdet.visualization import DetLocalVisualizer, TrackLocalVisualizer
label_desc: Use image node_id 2 for calling a global function with example usage: _create_panoptic_data(num_boxes, h, w) and returns: sem_seg