code: def get_dataset_split(tmp_dir, split, use_control_set):
      """Gives the file paths with regards to the given split.
  
      Args:
        tmp_dir: temp directory
        split: dataset split
        use_control_set: uses control dataset if true.
  
      Returns:
        list of file paths.
  
      """
      if not use_control_set:
          dataset_split = {
              problem.DatasetSplit.TRAIN: [
                  f
                  for f in tf.gfile.Glob(
                      os.path.join(tmp_dir, "train-novels/*/*.txt")
                  )
              ],
              problem.DatasetSplit.EVAL: [
                  os.path.join(
                      tmp_dir, "lambada_development_plain_text.txt"
                  )
              ],
              problem.DatasetSplit.TEST: [
                  os.path.join(tmp_dir, "lambada_test_plain_text.txt")
              ],
          }
  
      else:
          dataset_split = {
              problem.DatasetSplit.TRAIN: [
                  f
                  for f in tf.gfile.Glob(
                      os.path.join(tmp_dir, "train-novels/*/*.txt")
                  )
              ],
              problem.DatasetSplit.EVAL: [
                  os.path.join(
                      tmp_dir,
                      "lambada_control_test_data_plain_text.txt",
                  )
              ],
          }
  
      return dataset_split[split]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import csv
  import os
  import tarfile
  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.layers import modalities
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: get_dataset_split(tmp_dir, split, use_control_set) and returns: dataset_split