code: def updateParticle(part, best, chi, c):
      ce1 = (c * random.uniform(0, 1) for _ in range(len(part)))
      ce2 = (c * random.uniform(0, 1) for _ in range(len(part)))
      ce1_p = map(operator.mul, ce1, map(operator.sub, best, part))
      ce2_g = map(operator.mul, ce2, map(operator.sub, part.best, part))
      a = map(
          operator.sub,
          map(
              operator.mul,
              itertools.repeat(chi),
              map(operator.add, ce1_p, ce2_g),
          ),
          map(operator.mul, itertools.repeat(1 - chi), part.speed),
      )
      part.speed = list(map(operator.add, part.speed, a))
      part[:] = list(map(operator.add, part, part.speed))
  
file_path: deap/examples/pso/speciation.py
imports: import itertools
  import math
  import operator
  import random
  import numpy
  from deap import base
  from deap.benchmarks import movingpeaks
  from deap import creator
  from deap import tools
label_desc: Use image node_id 3 for calling a global function with example usage: updateParticle(part, best, chi, c) without return types