input: Write a python function to find the minimum of a given objective function using the Nelder-Mead method and return the result.
  assert optimize_function(lambda x: x[0]**2 + x[1]**2 + x[2]**2).fun < 1e-6
  assert optimize_function(lambda x: (x[0]-1)**2 + (x[1]-2)**2 + (x[2]-3)**2).x[0] == 1
  assert optimize_function(lambda x: (x[0]-1)**2 + (x[1]-2)**2 + (x[2]-3)**2).x[1] == 2
  assert optimize_function(lambda x: (x[0]-1)**2 + (x[1]-2)**2 + (x[2]-3)**2).x[2] == 3
output: def optimize_function(func):
      from scipy.optimize import minimize
      result = minimize(func, [0, 0, 0], method='Nelder-Mead')
      return result