input: def optimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) -> List[float]:
      """ Optimize the given objective function using scipy.optimize.minimize.
      The function takes an objective function and an initial guess for the solution,
      and returns the optimized solution.
      >>> optimize(lambda x: np.sum(x**2), [0.0, 0.0, 0.0])
      [0.0, 0.0, 0.0]
      >>> optimize(lambda x: (x[0] - 1)**2 + (x[1] - 2.5)**2, [0.0, 0.0])
      [1.0, 2.5]
      """
output:     from scipy.optimize import minimize
      import numpy as np
  
      result = minimize(obj_func, x0, method=method, options=options)
      return result.x.tolist()