input: Write a function to optimize a given multivariate function using the scipy.optimize module. The function should take a multivariate function and an initial guess as input, and return the optimized values of the variables. If the given function is invalid or the optimization fails, the function should return None.
  import scipy.optimize as opt 
    
  def optimize_function(function, initial_guess): 
      if not callable(function):
          return None
      result = opt.minimize(function, initial_guess) 
      return result.x if result.success else None
  
  assert optimize_function(lambda x: x[0]**2 + x[1]**2, [1, 1]) == [0, 0]
  assert optimize_function(lambda x: (x[0]-1)**2 + (x[1]-2)**2, [0, 0]) == [1, 2]
  assert optimize_function(lambda x: (x[0]-3)**2 + (x[1]+4)**2, [-3, 3]) == [3, -4]
  assert optimize_function(lambda x: x[0]**2 + x[1]**2, [2, -2]) == [0, 0]
  assert optimize_function(None, []) == None
output: def optimize_function(function, initial_guess): 
      if not callable(function):
          return None
      result = opt.minimize(function, initial_guess) 
      return result.x if result.success else None