input: Write a function to parse a CSV and generate a new CSV that adds the total number of rows, total number of columns, and total amount of the data for each attribute. If the input CSV file is empty, the output CSV should contain only the headers.
  assert parse_csv('test_empty.csv')==['Rows', 'Columns', 'Data Totals']
  assert parse_csv('test_single_row.csv')==['1', 'Columns of single row', 'Data Totals of single row']
  assert parse_csv('test_multi_row.csv')==['Rows', 'Columns of multi row', 'Data Totals of multi row']
  assert parse_csv('test_with_no_data.csv')==['Rows', 'Columns', 'Data Totals']
output: def parse_csv(filename):
      import csv
      with open(filename, 'r') as file:
          reader = csv.reader(file)
          rows = list(reader)
          if not rows:
              return ['Rows', 'Columns', 'Data Totals']
          num_rows = len(rows)
          num_cols = len(rows[0])
          data_totals = [sum(int(row[i]) for row in rows if row[i].strip()) for i in range(num_cols)]
          return [str(num_rows), str(num_cols), str(sum(data_totals))]