input: Write a python function to test the Motorcycle class's accelerate and brake methods.
  assert test_motorcycle_accelerate() == [10, 20, 30]
  assert test_motorcycle_brake() == [23, 16, 9, 2]
output: def test_motorcycle_accelerate():
      class Motorcycle:
          def __init__(self):
              self.speed = 0
  
          def accelerate(self):
              self.speed += 10
              return self.speed
  
      motorcycle = Motorcycle()
      speeds = [motorcycle.accelerate() for _ in range(3)]
      return speeds
  
  def test_motorcycle_brake():
      class Motorcycle:
          def __init__(self):
              self.speed = 30
  
          def brake(self):
              self.speed -= 7
              return self.speed
  
      motorcycle = Motorcycle()
      speeds = [motorcycle.brake() for _ in range(4)]
      return speeds