class_docstr: DatasetBuilder for schema_guided_dialogue dataset.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, path):
      """Yields examples."""
      # TODO(arunchaganty): load the services schemas from "schema.json".
  
      for f in path.glob("*.json"):
          if f.name.endswith("schema.json"):
              continue
  
          for datum in json.loads(f.read_text()):
              id_ = datum["dialogue_id"]
              utterances = [
                  turn["utterance"] for turn in datum["turns"]
              ]
              first_speaker = datum["turns"][0]["speaker"]
  
              yield id_, {
                  "utterances": utterances,
                  "first_speaker": first_speaker,
                  # TODO(arunchaganty): include frame and state annotations
                  "metadata": {
                      # TODO(arunchaganty): include schema definitions
                      "services": [
                          {
                              "name": service,
                          }
                          for service in datum["services"]
                      ],
                  },
              }
  
file_path: datasets/tensorflow_datasets/datasets/schema_guided_dialogue/schema_guided_dialogue_dataset_builder.py
imports: from __future__ import annotations
  import json
  import numpy
  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(path) without return types