code: def convertQuantum(swarm, rcloud, centre, dist):
      dim = len(swarm[0])
      for part in swarm:
          position = [random.gauss(0, 1) for _ in range(dim)]
          dist = math.sqrt(sum(x**2 for x in position))
  
          if dist == "gaussian":
              u = abs(random.gauss(0, 1.0 / 3.0))
              part[:] = [
                  (rcloud * x * u ** (1.0 / dim) / dist) + c
                  for x, c in zip(position, centre)
              ]
  
          elif dist == "uvd":
              u = random.random()
              part[:] = [
                  (rcloud * x * u ** (1.0 / dim) / dist) + c
                  for x, c in zip(position, centre)
              ]
  
          elif dist == "nuvd":
              u = abs(random.gauss(0, 1.0 / 3.0))
              part[:] = [
                  (rcloud * x * u / dist) + c
                  for x, c in zip(position, centre)
              ]
  
          del part.fitness.values
          del part.bestfit.values
          part.best = None
  
      return swarm
  
file_path: deap/examples/pso/multiswarm.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 2 for calling a global function with example usage: convertQuantum(swarm, rcloud, centre, dist) and returns: swarm