input: 
  from typing import List, Tuple
  
  def parse_csv(filename: str) -> Tuple[int, int, List[float]]:
      """Parses a CSV and generates a new CSV that adds the total number of rows, total 
      number of columns, and total amount of data for each attribute.
      >>> parse_csv('test.csv')
      (3, 4, [12.0, 15.0, 18.0])
      """
      import csv
      rows = 0
      cols = 0
      data_totals = []
      
      with open(filename) as csv_file:
          reader = csv.DictReader(csv_file)
          for row in reader:
              rows += 1
              cols = len(row)
              for col in row:
                  if len(data_totals) < cols:
                      data_totals.append(float(row[col]))
                  else:
                      data_totals[cols - 1] += float(row[col])
      
      return (rows, cols, data_totals)
  
  if __name__ == '__main__':
      filename = 'test.csv'
      parse_csv(filename)
  
output:     import csv
      rows = 0
      cols = 0
      data_totals = []
      
      with open(filename) as csv_file:
          reader = csv.DictReader(csv_file)
          for row in reader:
              rows += 1
              if cols == 0:
                  cols = len(row)
                  data_totals = [0.0] * cols
              for i, col in enumerate(row):
                  data_totals[i] += float(row[col])
      
      return (rows, cols, data_totals)