class_docstr: Trident roi head.
  
  Args:
      num_branch (int): Number of branches in TridentNet.
      test_branch_idx (int): In inference, all 3 branches will be used
          if `test_branch_idx==-1`, otherwise only branch with index
          `test_branch_idx` will be used.
code: def __init__(
      self, num_branch: int, test_branch_idx: int, **kwargs
  ) -> None:
      self.num_branch = num_branch
      self.test_branch_idx = test_branch_idx
      super().__init__(**kwargs)
  
file_path: mmdetection/mmdet/models/roi_heads/trident_roi_head.py
imports: from typing import Tuple
  import torch
  from mmcv.ops import batched_nms
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.utils import InstanceList
  from .standard_roi_head import StandardRoIHead
label_desc: Use image node_id 1 to create a new TridentRoIHead object from inherited base classes: StandardRoIHead with example: obj = TridentRoIHead(num_branch, test_branch_idx)