class_docstr: DatasetBuilder for domainnet dataset.
docstr: Generator of examples for each split.
code: def _generate_examples(
      self, split: Text = "train"
  ) -> Iterator[Tuple[Text, Dict[Text, Any]]]:
      """Generator of examples for each split."""
      with tf.io.gfile.GFile(
          self.splits[split]
      ) as split_file:  # pytype: disable=attribute-error  # gen-stub-imports
          for i, img_class_line in enumerate(
              split_file.read().split("\n")
          ):
              if not img_class_line:
                  continue
              key = f"{self.builder_config.name}_{split}_{i:08d}"
  
              example_path, example_class = img_class_line.split(" ")
              example_fullpath = os.path.join(
                  self.img_path, example_path
              )  # pytype: disable=attribute-error  # gen-stub-imports
  
              yield key, {
                  "image": example_fullpath,
                  "label": int(example_class),
              }
  
file_path: datasets/tensorflow_datasets/image_classification/domainnet/domainnet.py
imports: import dataclasses
  import os
  from typing import Any, Dict, Iterator, Optional, Text, Tuple
  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 Domainnet obj's underlying member method code with example usage: obj._generate_examples(split) without return types