class_docstr: Multiple branch pipeline wrapper.
  
  Generate multiple data-augmented versions of the same image.
  `MultiBranch` needs to specify the branch names of all
  pipelines of the dataset, perform corresponding data augmentation
  for the current branch, and return None for other branches,
  which ensures the consistency of return format across
  different samples.
  
  Args:
      branch_field (list): List of branch names.
      branch_pipelines (dict): Dict of different pipeline configs
          to be composed.
  
  Examples:
      >>> branch_field = ['sup', 'unsup_teacher', 'unsup_student']
      >>> sup_pipeline = [
      >>>     dict(type='LoadImageFromFile'),
      >>>     dict(type='LoadAnnotations', with_bbox=True),
      >>>     dict(type='Resize', scale=(1333, 800), keep_ratio=True),
      >>>     dict(type='RandomFlip', prob=0.5),
      >>>     dict(
      >>>         type='MultiBranch',
      >>>         branch_field=branch_field,
      >>>         sup=dict(type='PackDetInputs'))
      >>>     ]
      >>> weak_pipeline = [
      >>>     dict(type='LoadImageFromFile'),
      >>>     dict(type='LoadAnnotations', with_bbox=True),
      >>>     dict(type='Resize', scale=(1333, 800), keep_ratio=True),
      >>>     dict(type='RandomFlip', prob=0.0),
      >>>     dict(
      >>>         type='MultiBranch',
      >>>         branch_field=branch_field,
      >>>         sup=dict(type='PackDetInputs'))
      >>>     ]
      >>> strong_pipeline = [
      >>>     dict(type='LoadImageFromFile'),
      >>>     dict(type='LoadAnnotations', with_bbox=True),
      >>>     dict(type='Resize', scale=(1333, 800), keep_ratio=True),
      >>>     dict(type='RandomFlip', prob=1.0),
      >>>     dict(
      >>>         type='MultiBranch',
      >>>         branch_field=branch_field,
      >>>         sup=dict(type='PackDetInputs'))
      >>>     ]
      >>> unsup_pipeline = [
      >>>     dict(type='LoadImageFromFile'),
      >>>     dict(type='LoadEmptyAnnotations'),
      >>>     dict(
      >>>         type='MultiBranch',
      >>>         branch_field=branch_field,
      >>>         unsup_teacher=weak_pipeline,
      >>>         unsup_student=strong_pipeline)
      >>>     ]
      >>> from mmcv.transforms import Compose
      >>> sup_branch = Compose(sup_pipeline)
      >>> unsup_branch = Compose(unsup_pipeline)
      >>> print(sup_branch)
      >>> Compose(
      >>>     LoadImageFromFile(ignore_empty=False, to_float32=False, color_type='color', imdecode_backend='cv2') # noqa
      >>>     LoadAnnotations(with_bbox=True, with_label=True, with_mask=False, with_seg=False, poly2mask=True, imdecode_backend='cv2') # noqa
      >>>     Resize(scale=(1333, 800), scale_factor=None, keep_ratio=True, clip_object_border=True), backend=cv2), interpolation=bilinear) # noqa
      >>>     RandomFlip(prob=0.5, direction=horizontal)
      >>>     MultiBranch(branch_pipelines=['sup'])
      >>> )
      >>> print(unsup_branch)
      >>> Compose(
      >>>     LoadImageFromFile(ignore_empty=False, to_float32=False, color_type='color', imdecode_backend='cv2') # noqa
      >>>     LoadEmptyAnnotations(with_bbox=True, with_label=True, with_mask=False, with_seg=False, seg_ignore_label=255) # noqa
      >>>     MultiBranch(branch_pipelines=['unsup_teacher', 'unsup_student'])
      >>> )
code: def __init__(
      self, branch_field: List[str], **branch_pipelines: dict
  ) -> None:
      self.branch_field = branch_field
      self.branch_pipelines = {
          branch: Compose(pipeline)
          for branch, pipeline in branch_pipelines.items()
      }
  
imports: import copy
  from typing import Callable, Dict, List, Optional, Union
  import numpy
  from mmcv.transforms import BaseTransform, Compose
  from mmcv.transforms.utils import cache_random_params, cache_randomness
  from mmdet.registry import TRANSFORMS
label_desc: Use image node_id 1 to create a new MultiBranch object from inherited base classes: BaseTransform with example: obj = MultiBranch(branch_field)