input: 
  from scipy.optimize import minimize 
  
  def obj_func(x):
      """ Objective function to be optimized by the optimizer.
      >>> obj_func([1, 2, 3])
      # This will return a value that depends on the actual objective function 
      """
  
  def optimize(): 
      """ Optimizes the given objective function using the `minimize` function from scipy.optimize.
      >>> optimize()
      array([ 8.88178420e-16, -5.55111512e-16, -5.55111512e-16])
      """
      x0 = [0.0, 0.0, 0.0] 
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) 
      return res.x
  
  print(optimize())
  
output:     def obj_func(x):
          return x[0]**2 + x[1]**2 + x[2]**2