input: def optimize_objective_function(obj_func):
      """Optimize the given objective function using scipy's minimize function with the Nelder-Mead method.
      The function returns the optimized values of the variables.
      
      Example:
      def obj_func(x):
          return (x[0] - 1)**2 + (x[1] - 2.5)**2 + (x[2] + 3)**2
  
      >>> optimize_objective_function(obj_func)
      [1.0, 2.5, -3.0]
      """
      from scipy.optimize import minimize 
      
      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
      
      return optimize()
output:     from scipy.optimize import minimize 
      
      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
      
      return optimize()