code: def generate(size, pmin, pmax, smin, smax):
      part = creator.Particle(
          random.uniform(pmin, pmax) for _ in range(size)
      )
      part.speed = [random.uniform(smin, smax) for _ in range(size)]
      part.smin = smin
      part.smax = smax
      return part
  
file_path: deap/examples/pso/basic.py
imports: import operator
  import random
  import numpy
  import math
  from deap import base
  from deap import benchmarks
  from deap import creator
  from deap import tools
label_desc: Use image node_id 1 for calling a global function with example usage: generate(size, pmin, pmax, smin, smax) and returns: part