class_docstr: Base class for Cityscapes datasets.
class_docstr_tok: ["Base","class","for","Cityscapes","datasets","."]
code: def _generate_examples(self, **paths):
      left_imgs_root = paths["images_left"]
      for city_id in tf.io.gfile.listdir(left_imgs_root):
          paths_city_root = {
              feat_dir: os.path.join(path, city_id)
              for feat_dir, path in paths.items()
          }
  
          left_city_root = paths_city_root["images_left"]
          for left_img in tf.io.gfile.listdir(left_city_root):
              left_img_path = os.path.join(left_city_root, left_img)
              image_id = _get_left_image_id(left_img)
  
              if image_id in self.builder_config.ignored_ids:
                  continue
  
              features = {
                  "image_id": image_id,
                  "image_left": left_img_path,
              }
  
              if self.builder_config.right_images:
                  features["image_right"] = os.path.join(
                      paths_city_root["images_right"],
                      "{}_rightImg8bit.png".format(image_id),
                  )
  
              if self.builder_config.segmentation_labels:
                  features["segmentation_label"] = os.path.join(
                      paths_city_root["segmentation_labels"],
                      "{}_{}.png".format(
                          image_id, self.builder_config.label_suffix
                      ),
                  )
  
              if self.builder_config.disparity_maps:
                  features["disparity_map"] = os.path.join(
                      paths_city_root["disparity_maps"],
                      "{}_disparity.png".format(image_id),
                  )
  
              yield image_id, features
  
file_path: datasets/tensorflow_datasets/datasets/cityscapes/cityscapes_dataset_builder.py
imports: import os
  import re
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Builder obj's underlying member method code with example usage: obj._generate_examples() without return types