code: def test_transform(self):
      labeled_pipeline = Compose(self.labeled_pipeline)
      labeled_results = labeled_pipeline(copy.deepcopy(self.results))
      unlabeled_pipeline = Compose(self.unlabeled_pipeline)
      unlabeled_results = unlabeled_pipeline(
          copy.deepcopy(self.results)
      )
  
      # test branch sup_teacher and sup_student
      sup_branches = ["sup_teacher", "sup_student"]
      for branch in sup_branches:
          self.assertIn(branch, labeled_results["data_samples"])
          self.assertIn(
              "homography_matrix",
              labeled_results["data_samples"][branch],
          )
          self.assertIn(
              "labels",
              labeled_results["data_samples"][branch].gt_instances,
          )
          self.assertIn(
              "bboxes",
              labeled_results["data_samples"][branch].gt_instances,
          )
          self.assertIn(
              "masks",
              labeled_results["data_samples"][branch].gt_instances,
          )
          self.assertIn(
              "gt_sem_seg", labeled_results["data_samples"][branch]
          )
      # test branch unsup_teacher and unsup_student
      unsup_branches = ["unsup_teacher", "unsup_student"]
      for branch in unsup_branches:
          self.assertIn(branch, unlabeled_results["data_samples"])
          self.assertIn(
              "homography_matrix",
              unlabeled_results["data_samples"][branch],
          )
          self.assertNotIn(
              "labels",
              unlabeled_results["data_samples"][branch].gt_instances,
          )
          self.assertNotIn(
              "bboxes",
              unlabeled_results["data_samples"][branch].gt_instances,
          )
          self.assertNotIn(
              "masks",
              unlabeled_results["data_samples"][branch].gt_instances,
          )
          self.assertNotIn(
              "gt_sem_seg", unlabeled_results["data_samples"][branch]
          )
  
file_path: mmdetection/tests/test_datasets/test_transforms/test_wrappers.py
imports: import copy
  import os.path
  import unittest
  from mmcv.transforms import Compose
  from mmdet.datasets.transforms import MultiBranch, RandomOrder
  from mmdet.utils import register_all_modules
  from .utils import construct_toy_data
label_desc: Use image node_id 2 for calling the TestMultiBranch obj's underlying member method code with example usage: obj.test_transform() without return types