class_docstr: Oxford-IIIT pet dataset.
code: def _generate_examples(
      self, images_dir_path, annotations_dir_path, images_list_file
  ):
      with tf.io.gfile.GFile(images_list_file, "r") as images_list:
          for line in images_list:
              image_name, label, species, _ = line.strip().split(" ")
  
              trimaps_dir_path = os.path.join(
                  annotations_dir_path, "trimaps"
              )
  
              trimap_name = image_name + ".png"
              image_name += ".jpg"
              label = int(label) - 1
              species = int(species) - 1
  
              record = {
                  "image": os.path.join(images_dir_path, image_name),
                  "label": int(label),
                  "species": species,
                  "file_name": image_name,
                  "segmentation_mask": os.path.join(
                      trimaps_dir_path, trimap_name
                  ),
              }
              yield image_name, record
  
imports: import os
  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(images_dir_path, annotations_dir_path, images_list_file) without return types