class_docstr: Simplest base roi head including one bbox head and one mask head.
docstr: Initialize assigner and sampler.
docstr_tok: ["Initialize","assigner","and","sampler","."]
code: def init_assigner_sampler(self) -> None:
      """Initialize assigner and sampler."""
      self.bbox_assigner = None
      self.bbox_sampler = None
      if self.train_cfg:
          self.bbox_assigner = TASK_UTILS.build(self.train_cfg.assigner)
          self.bbox_sampler = TASK_UTILS.build(
              self.train_cfg.sampler, default_args=dict(context=self)
          )
  
imports: from typing import List, Optional, Tuple
  import torch
  from torch import Tensor
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.structures import DetDataSample, SampleList
  from mmdet.structures.bbox import bbox2roi
  from mmdet.utils import ConfigType, InstanceList
  from ..task_modules.samplers import SamplingResult
  from ..utils import empty_instances, unpack_gt_instances
  from .base_roi_head import BaseRoIHead
label_desc: Use image node_id 1 for calling the StandardRoIHead obj's underlying member method code with example usage: obj.init_assigner_sampler() without return types