code: def _get_mask(self, i):
      # List[{'segmentation', 'area', 'iscrowd',
      #       'image_id', 'bbox', 'category_id', 'id'}]
      annotation = self.id_to_anno[self.ids[i]]
      H = self.id_to_prop[self.ids[i]]["height"]
      W = self.id_to_prop[self.ids[i]]["width"]
  
      mask = []
      crowded = []
      for anno in annotation:
          msk = self._segm_to_mask(anno["segmentation"], (H, W))
          # FIXME: some of minival annotations are malformed.
          if msk.shape != (H, W):
              continue
          mask.append(msk)
          crowded.append(anno["iscrowd"])
      mask = np.array(mask, dtype=np.bool)
      crowded = np.array(crowded, dtype=np.bool)
      if len(mask) == 0:
          mask = np.zeros((0, H, W), dtype=np.bool)
  
      if not self.use_crowded:
          not_crowded = np.logical_not(crowded)
          mask = mask[not_crowded]
      return mask
  
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 4 for calling the COCOInstancesBaseDataset obj's underlying member method code with example usage: obj._get_mask(i) and returns: mask