code: def _rand_bboxes(num_boxes, h, w):
      cx, cy, bw, bh = torch.rand(num_boxes, 4).T
  
      tl_x = ((cx * w) - (w * bw / 2)).clamp(0, w)
      tl_y = ((cy * h) - (h * bh / 2)).clamp(0, h)
      br_x = ((cx * w) + (w * bw / 2)).clamp(0, w)
      br_y = ((cy * h) + (h * bh / 2)).clamp(0, h)
  
      bboxes = torch.stack([tl_x, tl_y, br_x, br_y], dim=0).T
      return bboxes
  
imports: import os.path
  import shutil
  import time
  from unittest import TestCase
  from unittest.mock import Mock
  import torch
  from mmengine.structures import InstanceData
  from mmdet.engine.hooks import DetVisualizationHook, TrackVisualizationHook
  from mmdet.structures import DetDataSample, TrackDataSample
  from mmdet.visualization import DetLocalVisualizer, TrackLocalVisualizer
label_desc: Use image node_id 1 for calling a global function with example usage: _rand_bboxes(num_boxes, h, w) and returns: bboxes