code: def _distributeCells(numCellsPop):
      ''' distribute cells across compute nodes using round-robin'''
      from .. import sim
          
      hostCells = {}
      for i in range(sim.nhosts):
          hostCells[i] = []
          
      for i in range(numCellsPop):
          hostCells[sim.nextHost].append(i)
          
          sim.nextHost+=1
          if sim.nextHost>=sim.nhosts:
              sim.nextHost=0
      
      if sim.cfg.verbose: 
          print(("Distributed population of %i cells on %s hosts: %s, next: %s"%(numCellsPop,sim.nhosts,hostCells,sim.nextHost)))
      return hostCellf _distributeCells(numCellsPop):
      ''' distribute cells across compute nodes using round-robin'''
      from .. import sim
          
      hostCells = {}
      for i in range(sim.nhosts):
          hostCells[i] = []
          
      for i in range(numCellsPop):
          hostCells[sim.nextHost].append(i)
          
          sim.nextHost+=1
          if sim.nextHost>=sim.nhosts:
              sim.nextHost=0
      
      if sim.cfg.verbose: 
          print(("Distributed population of %i cells on %s hosts: %s, next: %s"%(numCellsPop,sim.nhosts,hostCells,sim.nextHost)))
      return hostCells
docs: distribute cells across compute nodes using round-robin