input: Write a function that parses a CSV file and generates a new CSV file that includes the total number of rows, total number of columns, and the total sum of values for each attribute. The function should take the filename of the input CSV as its parameter.
  
  
  import csv
  
  def parse_csv(filename):
      with open(filename) as csv_file:
          reader = csv.DictReader(csv_file)
          rows = 0
          cols = 0
          data_totals = {}
  
          for row in reader:
              rows += 1
              if cols == 0:
                  cols = len(row)
              for col, value in row.items():
                  if col not in data_totals:
                      data_totals[col] = 0
                  try:
                      data_totals[col] += float(value)
                  except ValueError:
                      pass
  
          # Write to new CSV
          with open('new_csv.csv', mode='w', newline='') as new_csv_file:
              writer = csv.writer(new_csv_file)
              writer.writerow(['Rows', 'Columns'] + list(data_totals.keys()))
              writer.writerow([rows, cols] + list(data_totals.values()))
  
  # Example usage:
  assert parse_csv('test.csv') == None
  # The output will be a new CSV file named 'new_csv.csv' with the required information.
  
output: import csv
  
  def parse_csv(filename):
      with open(filename) as csv_file:
          reader = csv.DictReader(csv_file)
          rows = 0
          cols = 0
          data_totals = {}
  
          for row in reader:
              rows += 1
              if cols == 0:
                  cols = len(row)
              for col, value in row.items():
                  if col not in data_totals:
                      data_totals[col] = 0
                  try:
                      data_totals[col] += float(value)
                  except ValueError:
                      pass
  
          # Write to new CSV
          with open('new_csv.csv', mode='w', newline='') as new_csv_file:
              writer = csv.writer(new_csv_file)
              writer.writerow(['Rows', 'Columns'] + list(data_totals.keys()))
              writer.writerow([rows, cols] + list(data_totals.values()))