input: Write a function to implement the Gradient Descent Algorithm in Python. The function should take input variables x and y, along with optional parameters for the learning rate and number of iterations. The function should return the updated values of the slope (m_curr) and intercept (b_curr) after performing the specified number of iterations.
  assert gradient_descent([1, 2, 3, 4, 5], [2, 4, 6, 8, 10], 0.01, 100) == (1.9999999999999996, 3.599999999999999)
  assert gradient_descent([1, 2, 3, 4, 5], [3, 6, 9, 12, 15], 0.01, 50) == (2.9999999999999996, 4.999999999999999)
  assert gradient_descent([], [], 0.01, 100) == (0, 0)
  assert gradient_descent([1, 2, 3, 4, 5], [2, 4, 7, 8, 11], 0.02, 200) == (2.3999999999999995, 3.3999999999999995)
output: def gradient_descent(x, y, learning_rate=0.01, num_iterations=1000):
      m_curr = 0
      b_curr = 0
      n = len(x)
      
      if n == 0:
          return m_curr, b_curr
      
      for _ in range(num_iterations):
          y_predicted = m_curr * x + b_curr
          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