input: Write a function to implement the Gradient Descent Algorithm for linear regression. The function should take in the independent variable array x, the dependent variable array y, a learning rate, and the number of iterations to perform. The function should print the current values of the parameters m (slope) and b (intercept), along with the cost function value at each iteration. The function should return the final values of the parameters m and b.
  
  assert gradient_descent([1, 2, 3], [2, 4, 6], 0.01, 2)==(1.98, 0.04)
  assert gradient_descent([1, 2, 3], [2, 4, 6], 0.02, 1)==(3.84, 0.16)
  assert gradient_descent([1, 2, 3], [1, 4, 9], 0.01, 1)==(5.76, -0.28)
  assert gradient_descent([], [], 0.01, 1)==(0, 0)
output: def gradient_descent(x, y, learning_rate, num_iterations):
      m = 0
      b = 0
      n = len(x)
      if n == 0:
          return (0, 0)
      for i in range(num_iterations):
          y_pred = m * x + b
          cost = (1/n) * sum([val**2 for val in (y - y_pred)])
          m_gradient = -(2/n) * sum(x * (y - y_pred))
          b_gradient = -(2/n) * sum(y - y_pred)
          m = m - learning_rate * m_gradient
          b = b - learning_rate * b_gradient
          print(f"Iteration {i+1}: m = {m}, b = {b}, cost = {cost}")
      return (m, b)