class_docstr: SniperCOCODataSet
class_docstr_tok: ["SniperCOCODataSet"]
code: def generate_chips_roidbs(self, roidbs, is_trainset):
      if is_trainset:
          roidbs = self.anno_cropper.crop_anno_records(roidbs)
      else:
          roidbs = self.anno_cropper.crop_infer_anno_records(roidbs)
      return roidbs
  
imports: import os
  import cv2
  import json
  import copy
  import numpy
  from ppdet.core.workspace import register, serializable
  from ppdet.data.crop_utils.annotation_cropper import AnnoCropper
  from .coco import COCODataSet
  from .dataset import _make_dataset, _is_valid_file
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 5 for calling the SniperCOCODataSet obj's underlying member method code with example usage: obj.generate_chips_roidbs(roidbs, is_trainset) and returns: roidbs