input: Write a function to implement the Car class in Python that includes methods for accelerating and decelerating. Include an __init__ method to initialize attributes representing the make, model, color, and mileage of the car. 
  
  
  class Car:
      def __init__(self, make, model, color, mileage):
          self.make = make
          self.model = model
          self.color = color
          self.mileage = mileage
          self.speed = 0
  
      def accelerate(self, speed):
          self.speed += speed
  
      def decelerate(self, speed):
          self.speed -= speed
  
  # Test cases
  car1 = Car("Toyota", "Corolla", "Red", 50000)
  car1.accelerate(30)
  assert car1.speed == 30
  car1.decelerate(10)
  assert car1.speed == 20
  
  car2 = Car("Honda", "Civic", "Blue", 30000)
  car2.accelerate(50)
  assert car2.speed == 50
  car2.decelerate(50)
  assert car2.speed == 0
  
output: def __init__(self, make, model, color, mileage):
      self.make = make
      self.model = model
      self.color = color
      self.mileage = mileage
      self.speed = 0
  
  def accelerate(self, speed):
      self.speed += speed
  
  def decelerate(self, speed):
      self.speed -= speed