human
Solve the following python programming problem given the following code:
# Create an input function reading a file using the Dataset API
# Then provide the results to the Estimator API
def read_dataset(filename_pattern, mode, batch_size = 512):
  def _input_fn():
    def decode_csv(line_of_text):
      # TODO #1: Use tf.decode_csv to parse the provided line
      # TODO #2: Make a Python dict.  The keys are the column names, the values are from the parsed data
      # TODO #3: Return a tuple of features, label where features is a Python dict and label a float
      return features, label
    
    # TODO #4: Use tf.gfile.Glob to create list of files that match pattern
    file_list = None

    # Create dataset from file list
    dataset = (tf.data.TextLineDataset(file_list)  # Read text file
                 .map(decode_csv))  # Transform each elem by applying decode_csv fn
    
    # TODO #5: In training mode, shuffle the dataset and repeat indefinitely
    #                (Look at the API for tf.data.dataset shuffle)
    #          The mode input variable will be tf.estimator.ModeKeys.TRAIN if in training mode
    #          Tell the dataset to provide data in batches of batch_size 

    
    # This will now return batches of features, label
    return dataset
  return _input_fn
Given the above code, generate some markdown instructions for it.
assistant
#Here is the Python code you requested.

Lab Task 2
Fill out the details of the input function below