input: Write a python function to add and retrieve car details.
  assert add_and_retrieve_car(CarData(), "Tesla", "Red", 75000) == {"name": "Tesla", "color": "Red", "price": 75000}
  assert add_and_retrieve_car(CarData(), "BMW", "Black", 50000) == {"name": "BMW", "color": "Black", "price": 50000}
  assert add_and_retrieve_car(CarData(), "Audi", "White", 60000) == {"name": "Audi", "color": "White", "price": 60000}
output: class CarData:
      def __init__(self):
          self.cars = []
  
  def add_and_retrieve_car(car_data, name, color, price):
      car = {"name": name, "color": color, "price": price}
      car_data.cars.append(car)
      return car