class_docstr: SCAN task / splits as proposed by Brenden M. Lake and Marco Baroni.
class_docstr_tok: ["SCAN","task","\/","splits","as","proposed","by","Brenden","M.","Lake","and","Marco","Baroni","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(
      self, datapath, splitpath=None, splitname=None
  ):
      """Yields examples."""
      if splitpath:
          all_samples = list(self._read_examples(datapath))
          with epath.Path(splitpath).open() as infile:
              split = json.load(infile)
          for idx in split[splitname + "Idxs"]:
              yield all_samples[idx]
      else:
          for example in self._read_examples(datapath):
              yield example
  
file_path: datasets/tensorflow_datasets/datasets/scan/scan_dataset_builder.py
imports: import json
  import os
  from etils import epath
  import tensorflow_datasets.public_api
label_desc: Use image node_id 4 for calling the Builder obj's underlying member method code with example usage: obj._generate_examples(datapath, splitpath, splitname) without return types