docs: def create_ports(port, mpi, rank):
          """create a list of ports for the current rank"""
          if port == "random" or port is None:
              # ports will be filled in using random binding
              ports = {}
          else:
              port = int(port)
              ports = {
                  "REQ": port + 0,
                  "PUSH": port + 1,
                  "SUB": port + 2
              }
          # if we want to communicate with separate domains
          # we have to setup a socket for each of them
          if mpi == 'all':
              # use a socket for each rank rank
              for port in ports:
                  ports[port] += (rank * 3)
          return ports