class_docstr: Cascade roi head including one bbox head and one mask head.
  
  https://arxiv.org/abs/1712.00726
docstr: Initialize assigner and sampler for each stage.
docstr_tok: ["Initialize","assigner","and","sampler","for","each","stage","."]
code: def init_assigner_sampler(self):
      """Initialize assigner and sampler for each stage."""
      self.bbox_assigner = []
      self.bbox_sampler = []
      if self.train_cfg is not None:
          for idx, rcnn_train_cfg in enumerate(self.train_cfg):
              self.bbox_assigner.append(
                  build_assigner(rcnn_train_cfg.assigner)
              )
              self.current_stage = idx
              self.bbox_sampler.append(
                  build_sampler(rcnn_train_cfg.sampler, context=self)
              )
  
imports: import torch
  import torch.nn
  from mmdet.core import bbox2result, bbox2roi, bbox_mapping, build_assigner, build_sampler, merge_aug_bboxes, merge_aug_masks, multiclass_nms
  from ..builder import HEADS, build_head, build_roi_extractor
  from .base_roi_head import BaseRoIHead
  from .test_mixins import BBoxTestMixin, MaskTestMixin
label_desc: Use image node_id 4 for calling the CascadeRoIHead obj's underlying member method code with example usage: obj.init_assigner_sampler() without return types