class_docstr: Cityscapes Dataloader
code: def _class_to_index(self, mask):
      # assert the values
      values = np.unique(mask)
      for value in values:
          assert value in self._mapping
      index = np.digitize(mask.ravel(), self._mapping, right=True)
      return self._key[index].reshape(mask.shape)
  
file_path: gluon-cv/gluoncv/data/cityscapes.py
imports: import os
  import numpy
  from PIL import Image
  import mxnet
  from .segbase import SegmentationDataset
label_desc: Use image node_id 2 for calling the CitySegmentation obj's underlying member method code with example usage: obj._class_to_index(mask) and returns: self