input: Write a python function to write a dictionary to a CSV file.
  assert write_dict_to_csv({'name': 'Alice', 'age': 28, 'city': 'London'}, 'output.csv') == True
  assert write_dict_to_csv({'name': 'Bob', 'age': 35, 'city': 'Paris'}, 'output.csv') == True
  assert write_dict_to_csv({'name': 'Charlie', 'age': 22, 'city': 'Berlin'}, 'output.csv') == True
output: def write_dict_to_csv(data, filename):
      import csv
  
      try:
          with open(filename, mode='w', newline='') as file:
              writer = csv.DictWriter(file, fieldnames=data.keys())
              writer.writeheader()
              writer.writerow(data)
          return True
      except Exception as e:
          return False