code: def updateParticle(part, best, phi1, phi2):
      u1 = numpy.random.uniform(0, phi1, len(part))
      u2 = numpy.random.uniform(0, phi2, len(part))
      v_u1 = u1 * (part.best - part)
      v_u2 = u2 * (best - part)
      part.speed += v_u1 + v_u2
      for i, speed in enumerate(part.speed):
          if abs(speed) < part.smin:
              part.speed[i] = math.copysign(part.smin, speed)
          elif abs(speed) > part.smax:
              part.speed[i] = math.copysign(part.smax, speed)
      part += part.speed
  
file_path: deap/examples/pso/basic_numpy.py
imports: import operator
  import random
  import numpy
  from deap import base
  from deap import benchmarks
  from deap import creator
  from deap import tools
label_desc: Use image node_id 2 for calling a global function with example usage: updateParticle(part, best, phi1, phi2) without return types