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 features and target values respectively, along with optional parameters for `learning_rate` and `iterations`. It should return the optimized coefficients `m_curr` and `b_curr` after performing the specified number of iterations. If the input lists are empty, the function should return `None` for both coefficients.
  assert gradient_descent([1, 2, 3, 4, 5], [5, 7, 9, 11, 13])==(2.0, 3.0)
  assert gradient_descent([], [])==(None, None)
  assert gradient_descent([1, 2, 3], [1, 2, 3], learning_rate=0.01, iterations=10)==(0.01, 0.99)
output: def gradient_descent(x, y, learning_rate=0.01, iterations=1000):
      if not x or not y:
          return None, None
      
      n = len(x)
      m_curr = 0
      b_curr = 0
      
      for _ in range(iterations):
          y_pred = m_curr * x + b_curr
          dm = -(2/n) * sum(x * (y - y_pred))
          db = -(2/n) * sum(y - y_pred)
          m_curr -= learning_rate * dm
          b_curr -= learning_rate * db
      
      return m_curr, b_curr