class_docstr: GPT-3 Dataset.
class_docstr_tok: ["GPT-3","Dataset","."]
docstr: Yields examples based on directory, task name.
docstr_tok: ["Yields","examples","based","on","directory",",","task","name","."]
code: def _generate_examples(self, directory, task):
      """Yields examples based on directory, task name."""
  
      path = os.path.join(
          directory, "gpt-3-master", "data", task + ".jsonl"
      )
  
      if _is_gzip_file(task):
          path += ".gz"
  
      with tf.io.gfile.GFile(path, "rb") as f:
          if _is_gzip_file(task):
              f = gzip.GzipFile(fileobj=f)
  
          for line in f:
              yield uuid.uuid4().hex, json.loads(line)
  
file_path: datasets/tensorflow_datasets/text/gpt3.py
imports: import gzip
  import json
  import os
  import uuid
  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 Gpt3 obj's underlying member method code with example usage: obj._generate_examples(directory, task) without return types