input: Write a function to implement the Gradient Descent Algorithm for linear regression. The function should take in the input features (x) and the target values (y), along with optional parameters for the learning rate and the number of iterations. It should return the final values of the slope (m_curr) and the intercept (b_curr) after performing the gradient descent.
  
  
  assert gradient_descent([1, 2, 3, 4, 5], [5, 7, 9, 11, 13]) == (2.0, 3.0)
  assert gradient_descent([1, 2, 3], [2, 4, 6], learning_rate=0.05, iterations=200) == (2.0, 0.0)
  assert gradient_descent([1, 2, 3, 4], [1, 2, 3, 4], learning_rate=0.01, iterations=50) == (1.0, 0.0)
  assert gradient_descent([1, 2, 3], [3, 5, 7], learning_rate=0.02, iterations=100) == (2.0, 1.0)
  assert gradient_descent([], [], learning_rate=0.01, iterations=50) == (0.0, 0.0)
  
output: def gradient_descent(x, y, learning_rate=0.01, iterations=1000):
      m_curr = 0
      b_curr = 0
      n = len(x)
      
      for i in range(iterations):
          y_pred = m_curr * x + b_curr
          md = -(2/n) * sum(x * (y - y_pred))
          bd = -(2/n) * sum(y - y_pred)
          m_curr = m_curr - learning_rate * md
          b_curr = b_curr - learning_rate * bd
      
      return m_curr, b_curr