code: def get_regular_bitmask_instances(h, w):
      inst = Instances((h, w))
      inst.gt_boxes = Boxes(torch.rand(3, 4))
      inst.gt_boxes.tensor[:, 2:] += inst.gt_boxes.tensor[:, :2]
      inst.gt_classes = torch.tensor([3, 4, 5]).to(dtype=torch.int64)
      inst.gt_masks = BitMasks((torch.rand(3, h, w) > 0.5))
      return inst
  
imports: import itertools
  import unittest
  from contextlib import contextmanager
  from copy import deepcopy
  import torch
  from detectron2.structures import BitMasks, Boxes, ImageList, Instances
  from detectron2.utils.events import EventStorage
  from detectron2.utils.testing import get_model_no_weights
label_desc: Use image node_id 4 for calling a global function with example usage: get_regular_bitmask_instances(h, w) and returns: inst