code: def load_examples(tmp_dir, prop_train=0.09, prop_val=0.01):
      """Loads exampls from the tsv file.
  
      Args:
        tmp_dir: temp directory.
        prop_train: proportion of the train data
        prop_val: proportion of the validation data
  
      Returns:
        All examples in the dataset pluse train, test, and development splits.
  
      """
  
      infile = generator_utils.maybe_download(tmp_dir, _TAR, _URL)
      tf.logging.info("Loading examples")
  
      all_examples = []
      for i, d in enumerate(
          csv.DictReader(gzip.open(infile), delimiter="\t")
      ):
          if i % 100000 == 0:
              tf.logging.info("%d examples have been loaded...." % i)
          ex = {x: int(y) if y.isdigit() else y for x, y in d.items()}
          all_examples.append(ex)
  
      random.seed(1)
      random.shuffle(all_examples)
      n_train = int(len(all_examples) * prop_train)
      n_val = n_train + int(len(all_examples) * prop_val)
      train = all_examples[:n_train]
      val = all_examples[n_train:n_val]
      test = []
      for e in all_examples[n_val:]:
          if e["n_intervening"] == e["n_diff_intervening"]:
              test.append(e)
  
      return all_examples, train, val, test
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import csv
  import gzip
  import os
  import random
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: load_examples(tmp_dir, prop_train, prop_val) and returns: all_examples,  train,  val,  test