<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tfrecord_iterator_for_problem(problem, data_dir, dataset_split=tf.estimator.ModeKeys.TRAIN):
 """Iterate over the records on disk for the Problem."""

  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)