class_docstr: Wraps the MSCOCO datasets and is used by the iterator to fetch data.
class_docstr_tok: ["Wraps","the","MSCOCO","datasets","and","is","used","by","the","iterator","to","fetch","data","."]
code: def __init__(self, root_dir, data_dir, anno_file):
      coco = COCO(os.path.join(root_dir, anno_file))
      anns = coco.loadAnns(coco.getAnnIds())
  
      self.coco = coco
      self.anns = anns
      self.vocab = None  # Later set from outside
      self.coco_root = root_dir
      self.coco_data = data_dir
  
file_path: chainer/examples/image_captioning/datasets.py
imports: from collections import defaultdict
  import os
  import numpy
  from PIL import Image
  from pycocotools.coco import COCO
  from chainer import dataset
  from chainer.dataset.convert import to_device
label_desc: Use image node_id 1 to create a new MsCocoDataset object from inherited base classes: dataset with example: obj = MsCocoDataset(root_dir, data_dir, anno_file)