class_docstr: A pseudo sampler that does not do sampling actually.
docstr: Directly returns the positive and negative indices  of samples.
  
  Args:
      assign_result (:obj:`AssignResult`): Assigned results
      bboxes (torch.Tensor): Bounding boxes
      gt_bboxes (torch.Tensor): Ground truth boxes
  
  Returns:
      :obj:`SamplingResult`: sampler results
docstr_tok: ["Directly","returns","the","positive","and","negative","indices","of","samples",".","Args",":","assign_result","(",":","obj",":","`","AssignResult","`",")",":","Assigned","results","bboxes","(","torch.Tensor",")",":","Bounding","boxes","gt_bboxes","(","torch.Tensor",")",":","Ground","truth","boxes","Returns",":",":","obj",":","`","SamplingResult","`",":","sampler","results"]
code: def sample(self, assign_result, bboxes, gt_bboxes, **kwargs):
      """Directly returns the positive and negative indices  of samples.
  
      Args:
          assign_result (:obj:`AssignResult`): Assigned results
          bboxes (torch.Tensor): Bounding boxes
          gt_bboxes (torch.Tensor): Ground truth boxes
  
      Returns:
          :obj:`SamplingResult`: sampler results
      """
      pos_inds = (
          torch.nonzero(assign_result.gt_inds > 0, as_tuple=False)
          .squeeze(-1)
          .unique()
      )
      neg_inds = (
          torch.nonzero(assign_result.gt_inds == 0, as_tuple=False)
          .squeeze(-1)
          .unique()
      )
      gt_flags = bboxes.new_zeros(bboxes.shape[0], dtype=torch.uint8)
      sampling_result = SamplingResult(
          pos_inds, neg_inds, bboxes, gt_bboxes, assign_result, gt_flags
      )
      return sampling_result
  
file_path: insightface/detection/scrfd/mmdet/core/bbox/samplers/pseudo_sampler.py
imports: import torch
  from ..builder import BBOX_SAMPLERS
  from .base_sampler import BaseSampler
  from .sampling_result import SamplingResult
label_desc: Use image node_id 4 for calling the PseudoSampler obj's underlying member method code with example usage: obj.sample(assign_result, bboxes, gt_bboxes) and returns: sampling_result