input: 
  from scipy.optimize import minimize 
  
  def optimize(obj_func, x0):
      """ Optimize the given objective function using the Nelder-Mead algorithm.
      The function will return the optimized values of the input parameters.
  
      Example:
      >>> def example_func(x):
      ...     return x[0]**2 + x[1]**2 + x[2]**2
      >>> optimize(example_func, [0.0, 0.0, 0.0])
      array([0., 0., 0.])
      """
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) 
      return res.x
  
output:     res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) 
      return res.x