input: Write a function to optimize a given objective function using the scipy.optimize.minimize function. The objective function should be defined within the program. If the optimization is successful, return the optimized parameter values.
  
  def optimize(): 
      # set up optimization problem
      x0 = [0.0, 0.0, 0.0] 
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) 
      return res.x
  
  assert list(optimize()) == [0.0, 0.0, 0.0]
  assert list(optimize()) == [1.0, 1.0, 1.0]
  assert list(optimize()) == [-1.0, -1.0, -1.0]
  assert list(optimize()) == [0.5, 0.5, 0.5]
  assert list(optimize()) == [2.0, 2.0, 2.0]
output: 
  def optimize(): 
      def obj_func(x):
          return sum(x)
      x0 = [0.0, 0.0, 0.0] 
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) 
      return res.x
  