code: def subsample(self, labels):
      # type: (List[Tensor]) -> List[Tensor]
      sampled_pos_inds, sampled_neg_inds = self.fg_bg_sampler(labels)
      sampled_inds = []
      for img_idx, (pos_inds_img, neg_inds_img) in enumerate(
          zip(sampled_pos_inds, sampled_neg_inds)
      ):
          img_sampled_inds = torch.where(pos_inds_img | neg_inds_img)[0]
          sampled_inds.append(img_sampled_inds)
      return sampled_inds
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  import torchvision
  from torch import nn, Tensor
  from torchvision.ops import boxes, roi_align
  from .None import _utils
label_desc: Use image node_id 5 for calling the RoIHeads obj's underlying member method code with example usage: obj.subsample(labels) and returns: sampled_inds