input: Write a function to implement the Gradient Descent Algorithm for training a linear regression model. The function should take inputs `x` and `y`, representing the features and labels respectively, and optional parameters `learning_rate` and `iterations`. The function should iteratively update the slope `m_curr` and intercept `b_curr` to minimize the cost function and print the current values of `m_curr`, `b_curr`, and the cost for each iteration. Finally, it should return the optimized values of `m_curr` and `b_curr`.
  assert gradient_descent([1, 2, 3, 4, 5], [5, 7, 9, 11, 13], 0.01, 100) == (2.000000, 2.999999999999999)
  assert gradient_descent([1, 2, 3, 4, 5], [5, 7, 9, 11, 13], 0.02, 200) == (2.000000, 2.999999999999999)
  assert gradient_descent([1, 2, 3], [2, 4, 6], 0.01, 100) == (2.000000, 0.000000)
  assert gradient_descent([1, 2, 3], [2, 4, 6], 0.02, 200) == (2.000000, 0.000000)
  assert gradient_descent([], [], 0.01, 100) == (0, 0)
output: def gradient_descent(x, y, learning_rate=0.01, iterations=1000):
      n = len(x)
      if n == 0:
          return 0, 0
      m_curr = 0
      b_curr = 0
      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(f"Iteration {i+1}: m_curr = {m_curr}, b_curr = {b_curr}, cost = {cost}")
      return m_curr, b_curr