code: def main(dimension, iterations):
      
      optimizer = PSOOptimizer()
      solution = optimizer.minimize(sphere, -5.12, 5.12, dimension,
                                    max_iterations(iterations))
      return solution, optimizer
docs: Main function for PSO optimizer example.
  
      Instantiate PSOOptimizer to optimize 30-dimensional spherical function.