input: Write a python function to optimize a given function by finding its minimum value.
  assert optimize_function(lambda x: (x-3)**2 + 4)==4
  assert optimize_function(lambda x: (x+2)**2)==0
  assert optimize_function(lambda x: x**2 + 2*x + 1)==0
output: def optimize_function(func):
      from scipy.optimize import minimize
      result = minimize(func, 0)
      return result.fun