class_docstr: Computes matching between predictions and ground truth.
  Args:
      center_radius (int | float, optional): Ground truth center size
          to judge whether a prior is in center. Default 2.5.
      candidate_topk (int, optional): The candidate top-k which used to
          get top-k ious to calculate dynamic-k. Default 10.
      iou_weight (int | float, optional): The scale factor for regression
          iou cost. Default 3.0.
      cls_weight (int | float, optional): The scale factor for classification
          cost. Default 1.0.
      num_classes (int): The num_classes of dataset.
      use_vfl (int): Whether to use varifocal_loss when calculating the cost matrix.
class_docstr_tok: ["Computes","matching","between","predictions","and","ground","truth",".","Args",":","center_radius","(","int","|","float",",","optional",")",":","Ground","truth","center","size","to","judge","whether","a","prior","is","in","center",".","Default","2.5.","candidate_topk","(","int",",","optional",")",":","The","candidate","top-k","which","used","to","get","top-k","ious","to","calculate","dynamic-k",".","Default","10.","iou_weight","(","int","|","float",",","optional",")",":","The","scale","factor","for","regression","iou","cost",".","Default","3.0.","cls_weight","(","int","|","float",",","optional",")",":","The","scale","factor","for","classification","cost",".","Default","1.0.","num_classes","(","int",")",":","The","num_classes","of","dataset",".","use_vfl","(","int",")",":","Whether","to","use","varifocal_loss","when","calculating","the","cost","matrix","."]
code: def get_sample(self, assign_gt_inds, gt_bboxes):
      pos_inds = np.unique(np.nonzero(assign_gt_inds > 0)[0])
      neg_inds = np.unique(np.nonzero(assign_gt_inds == 0)[0])
      pos_assigned_gt_inds = assign_gt_inds[pos_inds] - 1
  
      if gt_bboxes.size == 0:
          # hack for index error case
          assert pos_assigned_gt_inds.size == 0
          pos_gt_bboxes = np.empty_like(gt_bboxes).reshape(-1, 4)
      else:
          if len(gt_bboxes.shape) < 2:
              gt_bboxes = gt_bboxes.resize(-1, 4)
          pos_gt_bboxes = gt_bboxes[pos_assigned_gt_inds, :]
      return pos_inds, neg_inds, pos_gt_bboxes, pos_assigned_gt_inds
  
file_path: PaddleDetection/ppdet/modeling/assigners/simota_assigner.py
imports: import paddle
  import numpy
  import paddle.nn.functional
  from ppdet.modeling.losses.varifocal_loss import varifocal_loss
  from ppdet.modeling.bbox_utils import batch_bbox_overlaps
  from ppdet.core.workspace import register
label_desc: Use image node_id 4 for calling the SimOTAAssigner obj's underlying member method code with example usage: obj.get_sample(assign_gt_inds, gt_bboxes) and returns: pos_inds,  neg_inds,  pos_gt_bboxes,  pos_assigned_gt_inds