input: Write a Python function to find the minimum of a given function using gradient descent.
  assert optimize(minimize, 0) == (-7.000000000000053, -6.000000000001872)
  assert optimize(minimize, -10) == (-7.000000000000053, -6.000000000001872)
  assert optimize(minimize, 10) == (-7.000000000000053, -6.000000000001872)
output: def optimize(func, initial_guess, learning_rate=0.01, tolerance=1e-7, max_iterations=10000):
      x = initial_guess
      for _ in range(max_iterations):
          gradient = (func(x + tolerance) - func(x - tolerance)) / (2 * tolerance)
          new_x = x - learning_rate * gradient
          if abs(new_x - x) < tolerance:
              break
          x = new_x
      return x, func(x)
  
  def minimize(x):
      return (x + 7) ** 2 - 6