input: Write a python function to simulate a race between two cars and determine the winner.
  assert simulate_race(Car('Red'), Car('Black')).name in ['Red', 'Black']
  assert simulate_race(Car('Car A'), Car('Car B')).distance_travelled >= 1000
output: import random
  
  class Car:
      def __init__(self, name):
          self.name = name
          self.distance_travelled = 0
  
      def drive(self):
          self.distance_travelled += random.randint(50, 150)
  
  def simulate_race(car1, car2):
      while car1.distance_travelled < 1000 and car2.distance_travelled < 1000:
          car1.drive()
          car2.drive()
      if car1.distance_travelled >= 1000 and car2.distance_travelled >= 1000:
          return car1 if car1.distance_travelled > car2.distance_travelled else car2
      elif car1.distance_travelled >= 1000:
          return car1
      else:
          return car2