class_docstr: Generate data from the COCO dataset.
  
  See https://github.com/cocodataset/cocoapi/tree/master/PythonAPI for more information.
class_docstr_tok: ["Generate","data","from","the","COCO","dataset",".","See","https",":","\/\/github.com\/cocodataset\/cocoapi\/tree\/master\/PythonAPI","for","more","information","."]
docstr: Map name to label.
          
docstr_tok: ["Map","name","to","label","."]
code: def name_to_label(self, name):
      """Map name to label."""
      return self.classes[name]
  
imports: from ..preprocessing.generator import Generator
  from ..utils.image import read_image_bgr
  import os
  import numpy
  from pycocotools.coco import COCO
label_desc: Use image node_id 7 for calling the CocoGenerator obj's underlying member method code with example usage: obj.name_to_label(name) and returns: self