input: Write a function to implement the Gradient Descent Algorithm for linear regression. The function should take in two lists `x` and `y` representing the input features and output values respectively, and two optional parameters `learning_rate` and `iterations` representing the learning rate and number of iterations for the algorithm. The function should return the final values of the slope `m` and the intercept `b` after the specified number of iterations.
  
  import numpy as np
  
  def gradient_descent(x, y, learning_rate=0.01, iterations=100):
      m_curr = b_curr = 0
      n = len(x)
      for i in range(iterations):
          y_predicted = m_curr * x + b_curr
          cost = (1/n) * sum([val**2 for val in (y-y_predicted)])
          md = -(2/n)*sum(x*(y-y_predicted))
          bd = -(2/n)*sum(y-y_predicted)
          m_curr = m_curr - learning_rate * md
          b_curr = b_curr - learning_rate * bd
          print ("m {}, b {}, cost {} iteration {}".format(m_curr, b_curr, cost, i))
      return m_curr, b_curr
  
  assert gradient_descent(np.array([1, 2, 3, 4, 5]), np.array([5, 7, 9, 11, 13])) == (2.0, 3.0)
  assert gradient_descent(np.array([1, 2, 3, 4, 5]), np.array([2, 4, 6, 8, 10]), learning_rate=0.02, iterations=200) == (2.0, 0.0)
  assert gradient_descent(np.array([1, 2, 3]), np.array([1, 4, 9]), learning_rate=0.01, iterations=50) == (4.0, -2.0)
  assert gradient_descent(np.array([]), np.array([])) == (0.0, 0.0)
  assert gradient_descent(np.array([1]), np.array([2])) == (0.0, 2.0)
output: def gradient_descent(x, y, learning_rate=0.01, iterations=100):
      m_curr = b_curr = 0
      n = len(x)
      for i in range(iterations):
          y_predicted = m_curr * x + b_curr
          cost = (1/n) * sum([val**2 for val in (y-y_predicted)])
          md = -(2/n)*sum(x*(y-y_predicted))
          bd = -(2/n)*sum(y-y_predicted)
          m_curr = m_curr - learning_rate * md
          b_curr = b_curr - learning_rate * bd
      return m_curr, b_curr