input: Write a function to optimize the given objective function using the scipy.optimize.minimize method. The function should return the optimized values of the variables.
  
  assert optimize()==[x1, y1, z1]
  assert optimize()==[x2, y2, z2]
  assert optimize()==[x3, y3, z3]
output: def optimize():
      from scipy.optimize import minimize
      def objective(x):
          return (x[0] - 1)**2 + (x[1] - 2.5)**2 + (x[2] - 3.5)**2
      
      initial_guess = [0, 0, 0]
      result = minimize(objective, initial_guess, method='BFGS')
      return result.x