def _job_sorting_key(self, job):
        if self._base_graph is None:
            return 0
        MAX_JOBS = 1000000
        if job.addr not in self._node_addr_visiting_order:
            return MAX_JOBS
        return self._node_addr_visiting_order.index(job.addr)