Implementing the Particle Swarm Optimization (PSO) Algorithm in Python