def METHOD_NAME(self) -> int:
    """A helper method for getting the node rank.
    The node rank is determined by the position of the current node in the list of hosts used in the job. This is
    calculated by reading all hosts from ``LSB_DJOB_RANKFILE`` and finding this node's hostname in the list.
    """
    hosts = self._read_hosts()
    count: Dict[str, int] = {}
    for host in hosts:
        if host not in count:
            count[host] = len(count)
    return count[socket.gethostname()]