input: Write a python function to optimize a given complex function by using particle swarm optimization.
  assert np.allclose(optimize_function(), np.zeros(2), atol=1e-2)
  assert np.allclose(optimize_function(), [0, 0], atol=1e-2)
  assert len(optimize_function()) == 2
output: def optimize_function():
      import numpy as np
      from scipy.optimize import differential_evolution
      
      # Define the complex function to optimize
      def complex_function(x):
          return np.sum(x**2)
      
      # Define the bounds for the variables
      bounds = [(-10, 10), (-10, 10)]
      
      # Use differential evolution to optimize the function
      result = differential_evolution(complex_function, bounds)
      
      return result.x