input: Write a function to optimize the given objective function using the scipy.optimize.minimize method. The objective function is defined by the user and should be minimized. The function should use the Nelder-Mead method with options for tolerance and display. Return the optimized values for x.
  assert optimize() == [0.0, 0.0, 0.0]
output: def optimize():
      from scipy.optimize import minimize
      
      def objective(x):
          return x[0]**2 + x[1]**2 + x[2]**2
      
      initial_guess = [1, 1, 1]
      result = minimize(objective, initial_guess, method='Nelder-Mead', options={'xtol': 1e-6, 'disp': True})
      
      return result.x