input: Write a function to optimize the given objective function using the `scipy.optimize.minimize` method. The function should set up the optimization problem with initial guess `x0` and return the optimized values of `x`.
  assert optimize() == [0.0, 0.0, 0.0]
  assert optimize() == [1.0, 1.0, 1.0]
  assert optimize() == [-1.0, -1.0, -1.0]
  assert optimize() == [1.5, 2.0, 2.5]
  assert optimize() == [-2.0, 0.5, 1.0]
output: def optimize():
      from scipy.optimize import minimize
      def objective(x):
          return sum(x**2)
      x0 = [1.0, 1.0, 1.0]
      result = minimize(objective, x0)
      return result.x