class_docstr: DatasetBuilder for natural_instructions dataset.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, path):
      """Yields examples."""
      filepaths = path if isinstance(path, dict) else {"test": path}
      for task_name, fp in filepaths.items():
          data = json.loads(fp.read_text())
          source = data["Source"]
          definition = data["Definition"]
          if isinstance(source, list):
              source = source[0]
          if isinstance(definition, list):
              definition = definition[0]
          for row in data["Instances"]:
              yield row["id"], {
                  "id": row["id"],
                  "input": row["input"],
                  "output": row["output"][0],
                  "source": source,
                  "task_name": task_name,
                  "definition": definition,
              }
  
imports: import json
  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