code: def tfrecord_iterator_for_problem(problem, data_dir,
                                    dataset_split=tf.estimator.ModeKeys.TRAIN):
    
    filenames = tf.gfile.Glob(problem.filepattern(data_dir, mode=dataset_split))
    example_spec = problem.example_reading_spec()[0]
    return tfrecord_iterator(filenames, example_spec=example_spec)
docs: Iterate over the records on disk for the Problem.