input: Write a python function to read a CSV file and print the top 5 companies by total revenue.
  assert read_and_print_top_companies('test_data_1.csv')=="Top 5 Companies by Total Revenue\n-------------------------------\nCompany name: A, Total Revenue: 1000.00, Total Profit: 200.00\nCompany name: B, Total Revenue: 900.00, Total Profit: 150.00\nCompany name: C, Total Revenue: 800.00, Total Profit: 180.00\nCompany name: D, Total Revenue: 750.00, Total Profit: 120.00\nCompany name: E, Total Revenue: 700.00, Total Profit: 100.00"
  assert read_and_print_top_companies('test_data_2.csv')=="Top 5 Companies by Total Revenue\n-------------------------------\nCompany name: X, Total Revenue: 2000.00, Total Profit: 400.00\nCompany name: Y, Total Revenue: 1800.00, Total Profit: 300.00\nCompany name: Z, Total Revenue: 1700.00, Total Profit: 250.00\nCompany name: W, Total Revenue: 1600.00, Total Profit: 220.00\nCompany name: V, Total Revenue: 1500.00, Total Profit: 200.00"
output: def read_and_print_top_companies(filename):
      import csv
  
      # Read the CSV file and store the data in a list
      companies = []
      with open(filename, mode='r') as file:
          reader = csv.DictReader(file)
          for row in reader:
              company = {
                  'name': row['Company name'],
                  'revenue': float(row['Total Revenue']),
                  'profit': float(row['Total Profit'])
              }
              companies.append(company)
  
      # Sort the companies by total revenue in descending order
      companies.sort(key=lambda x: x['revenue'], reverse=True)
  
      # Get the top 5 companies
      top_5_companies = companies[:5]
  
      # Create the output string
      output = "Top 5 Companies by Total Revenue\n-------------------------------\n"
      for company in top_5_companies:
          output += f"Company name: {company['name']}, Total Revenue: {company['revenue']:.2f}, Total Profit: {company['profit']:.2f}\n"
  
      return output.strip()