input: Write a function to implement the Gradient Descent Algorithm in Python. The function should take in the input data x, the target data y, a learning rate, and the number of iterations as parameters. It should return the updated values of m and b after performing gradient descent. If the input x or y is empty, return (None, None). 
  assert gradient_descent([1, 2, 3], [2, 4, 6], learning_rate=0.01, iterations=1) == (1.08, 0.04)
  assert gradient_descent([1, 2, 3], [2, 4, 6], learning_rate=0.01, iterations=2) == (1.1584, 0.0784)
  assert gradient_descent([], [2, 4, 6], learning_rate=0.01, iterations=1) == (None, None)
  assert gradient_descent([1, 2, 3], [], learning_rate=0.01, iterations=1) == (None, None)
  assert gradient_descent([], [], learning_rate=0.01, iterations=1) == (None, None)
output: def gradient_descent(x, y, learning_rate, iterations):
      if not x or not y:
          return None, None
      
      m, b = 0, 0
      n = len(x)
      
      for _ in range(iterations):
          y_pred = m * x + b
          dm = (-2/n) * sum(x * (y - y_pred))
          db = (-2/n) * sum(y - y_pred)
          m -= learning_rate * dm
          b -= learning_rate * db
      
      return m, b