class_docstr: Cityscapes dataset.
  
  The ``img_suffix`` is fixed to '_leftImg8bit.png' and ``seg_map_suffix`` is
  fixed to '_gtFine_labelTrainIds.png' for Cityscapes dataset.
docstr: Convert trainId to id for cityscapes.
docstr_tok: ["Convert","trainId","to","id","for","cityscapes","."]
code: def _convert_to_label_id(result):
      """Convert trainId to id for cityscapes."""
      if isinstance(result, str):
          result = np.load(result)
      import cityscapesscripts.helpers.labels as CSLabels
  
      result_copy = result.copy()
      for trainId, label in CSLabels.trainId2label.items():
          result_copy[result == trainId] = label.id
  
      return result_copy
  
file_path: lavis/lavis/common/annotator/uniformer/mmseg/datasets/cityscapes.py
imports: import os.path
  import tempfile
  import annotator.uniformer.mmcv
  import numpy
  from annotator.uniformer.mmcv.utils import print_log
  from PIL import Image
  from .builder import DATASETS
  from .custom import CustomDataset
label_desc: Use image node_id 2 for calling the CityscapesDataset obj's underlying member method code with example usage: obj._convert_to_label_id(result) and returns: result_copy