class_docstr: Semi-supervision Cityscapes dataset with images, segmentation labels and data list.
  Source: https://www.cityscapes-dataset.com/
  Semi-supervision Cityscapes dataset from [OneDrive](https://pkueducn-my.sharepoint.com/:f:/g/personal/pkucxk_pku_edu_cn/EtjNKU0oVMhPkOKf9HTPlVsBIHYbACel6LSvcUeP4MXWVg?e=139icd)
  
  The folder structure is as follows:
  
      city
      ├── config_new
      │    ├── coarse_split
      │    │   ├── train_extra_3000.txt
      │    │   ├── train_extra_6000.txt
      │    │   └── train_extra_9000.txt
      │    ├── subset_train
      │    │   ├── train_aug_labeled_1-16.txt
      │    │   ├── train_aug_labeled_1-2.txt
      │    │   ├── train_aug_labeled_1-4.txt
      │    │   ├── train_aug_labeled_1-8.txt
      │    │   ├── train_aug_unlabeled_1-16.txt
      │    │   ├── train_aug_unlabeled_1-2.txt
      │    │   ├── train_aug_unlabeled_1-4.txt
      │    │   └── train_aug_unlabeled_1-8.txt
      │    ├── test.txt
      │    ├── train.txt
      │    ├── train_val.txt
      │    └── val.txt  
      ├── generate_colored_gt.py
      ├── images
      │   ├── test
      │   ├── train
      │   └── val
      └── segmentation
          ├── test
          ├── train
          └── val
  
  Args:
      transforms (list): Transforms for image.
      dataset_root (str): Cityscapes dataset directory.
      mode (str, optional): Which part of dataset to use. it is one of ('train', 'val', 'test'). Default: 'train'.
      unsupervised (bool, optional): Whether haven't labels. Default: False.
code: def __getitem__(self, index):
      if self._file_length is not None:
          names = self._construct_new_file_names(self._file_length)[
              index
          ]
      else:
          names = self._file_names[index]
  
      image_path = self.dataset_root + names[0]
      label_path = self.dataset_root + names[1]
  
      if not self.unsupervised and self.mode == "train":
          data = {"img": image_path, "label": label_path}
          data["gt_fields"] = ["label"]
          data["trans_info"] = []
          data = self.transforms(data)
  
      elif not self.unsupervised and self.mode == "val":
          data = {"img": image_path, "label": label_path}
          data["gt_fields"] = []
          data["trans_info"] = []
          data = self.transforms(data)
          data["label"] = data["label"][np.newaxis, :, :]
      elif self.unsupervised and self.mode == "train":
          data = {"img": image_path}
          data["trans_info"] = []
          data["label"] = []
          data = self.transforms(data)
      else:
          raise ValueError(
              "when mode is 'val', self.unsupervised should be False."
          )
  
      return data
  
file_path: PaddleSeg/contrib/CrossPseudoSupervision/datasets/cityscapes_cps.py
imports: import os
  import numpy
  from paddleseg.transforms import Compose
  from cvlibs import manager
  from .basedataset import BaseDataset
label_desc: Use image node_id 2 for calling the CityscapesCPS obj's underlying member method code with example usage: obj.__getitem__(index) and returns: data