code: def _get_annotations(self, i):
      # List[{'segmentation', 'area', 'iscrowd',
      #       'image_id', 'bbox', 'category_id', 'id'}]
      annotation = self.id_to_anno[self.ids[i]]
      bbox = np.array(
          [ann["bbox"] for ann in annotation], dtype=np.float32
      )
      if len(bbox) == 0:
          bbox = np.zeros((0, 4), dtype=np.float32)
      # (x, y, width, height)  -> (x_min, y_min, x_max, y_max)
      bbox[:, 2] = bbox[:, 0] + bbox[:, 2]
      bbox[:, 3] = bbox[:, 1] + bbox[:, 3]
      # (x_min, y_min, x_max, y_max) -> (y_min, x_min, y_max, x_max)
      bbox = bbox[:, [1, 0, 3, 2]]
  
      label = np.array(
          [
              self.cat_ids.index(ann["category_id"])
              for ann in annotation
          ],
          dtype=np.int32,
      )
  
      area = np.array(
          [ann["area"] for ann in annotation], dtype=np.float32
      )
  
      crowded = np.array(
          [ann["iscrowd"] for ann in annotation], dtype=np.bool
      )
  
      # Remove invalid boxes
      bbox_area = np.prod(bbox[:, 2:] - bbox[:, :2], axis=1)
      keep_mask = np.logical_and(
          bbox[:, 0] <= bbox[:, 2], bbox[:, 1] <= bbox[:, 3]
      )
      keep_mask = np.logical_and(keep_mask, bbox_area > 0)
  
      if not self.use_crowded:
          keep_mask = np.logical_and(keep_mask, np.logical_not(crowded))
  
      bbox = bbox[keep_mask]
      label = label[keep_mask]
      area = area[keep_mask]
      crowded = crowded[keep_mask]
      return bbox, label, area, crowded
  
file_path: chainercv/chainercv/datasets/coco/coco_instances_base_dataset.py
imports: from collections import defaultdict
  import json
  import numpy
  import os
  import PIL.Image
  import PIL.ImageDraw
  from chainercv.chainer_experimental.datasets.sliceable import GetterDataset
  from chainercv.datasets.coco.coco_utils import get_coco
  from chainercv import utils
label_desc: Use image node_id 5 for calling the COCOInstancesBaseDataset obj's underlying member method code with example usage: obj._get_annotations(i) and returns: bbox,  label,  area,  crowded