input: Write a python function to implement gradient descent for finding the minimum of a quadratic function. 
  assert round(gradient_descent(4), 5) == -0.33333
  assert round(gradient_descent(10), 5) == -0.33333
  assert round(gradient_descent(-5), 5) == -0.33333
output: def gradient_descent(x, learning_rate=0.1, precision=0.00001, max_iters=1000):
      def gradient(x):
          return 2 * (x + 1)  # derivative of f(x) = (x + 1)^2
  
      for _ in range(max_iters):
          grad = gradient(x)
          x_new = x - learning_rate * grad
          if abs(x_new - x) < precision:
              break
          x = x_new
  
      return x
  
  # Test the function
  print(round(gradient_descent(4), 5))
  print(round(gradient_descent(10), 5))
  print(round(gradient_descent(-5), 5))