docs: def divideHosts(self, hosts, qty):
          """Divide processes among hosts."""
          maximumWorkers = sum(host[1] for host in hosts)
  
          # If specified amount of workers is greater than sum of each specified.
          if qty > maximumWorkers:
              index = 0
              while qty > maximumWorkers:
                  hosts[index] = (hosts[index][0], hosts[index][1] + 1)
                  index = (index + 1) % len(hosts)
                  maximumWorkers += 1
  
          # If specified amount of workers if lower than sum of each specified.
          elif qty < maximumWorkers:
  
              while qty < maximumWorkers:
                  maximumWorkers -= hosts[-1][1]
                  if qty > maximumWorkers:
                      hosts[-1] = (hosts[-1][0], qty - maximumWorkers)
                      maximumWorkers += hosts[-1][1]
                  else:
                      del hosts[-1]
  
  
          # Checking if the broker if externally routable
          if self.externalHostname in utils.loopbackReferences and \
                  len(hosts) > 1 and \
                  not self.tunnel:
              raise Exception("\n"
                              "Could not find route from external worker to the "
                              "broker: Unresolvable hostname or IP address.\n "
                              "Please specify your externally routable hostname "
                              "or IP using the --external-hostname parameter or "
                              "use the --tunnel flag.")
          return hosts