def do_network_job(bench_all, current_job, log_dir, total_runtime):
    bench = dict(bench_all)

    # In the network bench, step-hosts shall be modulo 2
    bench['step-hosts'] = get_default_value(current_job, 'step-hosts', 2)
    bench['arity'] = get_default_value(current_job, 'arity', 2)

    if parse_job_config(bench, current_job, HM.NETWORK, log_dir) is True:
        # Only consider to watch step-hosts vs arity if we have some rampup
        if (int(bench['min_hosts']) != int(bench['max_hosts'])):
            if ((int(bench['arity']) % int(bench['step-hosts'])) != 0):
                HP.logger.error("NETWORK: step-hosts shall be modulo arity (%d)" % int(bench['arity']))
                HP.logger.error("NETWORK: Canceling Test")
                return False

        if ((int(bench['min_hosts']) % int(bench['arity'])) != 0) or ((int(bench['max_hosts']) % int(bench['arity'])) != 0):
            HP.logger.error("NETWORK: min and max-hosts shall be modulo arity %d" % int(bench['arity']))
            HP.logger.error("NETWORK: Canceling Test")
            return False

        nb_loops = 0
        hosts_series = compute_nb_hosts_series(bench)
        for nb_hosts in hosts_series:
            nb_loops = nb_loops + 1
            iter_bench = dict(bench)
            iter_bench['cores'] = get_default_value(current_job, 'cores', 1)
            iter_bench['block-size'] = get_default_value(current_job, 'block-size', "0")
            iter_bench['mode'] = get_default_value(current_job, 'mode', HM.BANDWIDTH)
            iter_bench['network-hosts'] = get_default_value(current_job, 'network-hosts', "0.0.0.0/0")
            iter_bench['connection'] = get_default_value(current_job, 'connection', HM.TCP)
            iter_bench['nb-hosts'] = nb_hosts
            total_runtime += iter_bench['runtime']

            iter_bench['hosts-list'] = get_hosts_list_from_affinity(iter_bench, True)
            unsorted_list = get_hosts_list_from_affinity(iter_bench)

            if (len(unsorted_list) < iter_bench['nb-hosts']):
                HP.logger.error("NETWORK: %d hosts expected while affinity only provides %d hosts available" % (iter_bench['nb-hosts'], len(unsorted_list)))
                HP.logger.error("NETWORK: Canceling test %d / %d" % ((iter_bench['nb-hosts'], iter_bench['max_hosts'])))
                continue

            select_vms_from_networks(iter_bench)

            if (len(iter_bench['ip-list']) < iter_bench['nb-hosts']):
                HP.logger.error("NETWORK: %d hosts expected while ip-based filtering only provides %d hosts available" % (iter_bench['nb-hosts'], len(iter_bench['ip-list'])))
                HP.logger.error("NETWORK: Canceling test %d / %d" % ((iter_bench['nb-hosts'], iter_bench['max_hosts'])))
                continue

            if (nb_hosts % iter_bench['arity'] != 0):
                HP.logger.error("NETWORK: It's impossible to get an arity=%d with %d hosts" % (iter_bench['arity'], len(iter_bench['nb-hosts'])))
                HP.logger.error("NETWORK: Canceling test %d / %d" % ((iter_bench['nb-hosts'], iter_bench['max_hosts'])))
                continue

            metrics_log_dir = prepare_metrics(log_dir, iter_bench, HM.NETWORK)

            if prepare_network_bench(iter_bench, HM.INIT) is False:
                HP.logger.error("NETWORK: Unable to complete initialisation")
                HP.logger.error("NETWORK: Canceling test %d / %d" % ((iter_bench['nb-hosts'], iter_bench['max_hosts'])))
                prepare_network_bench(iter_bench, HM.CLEAN)
                continue

            if iter_bench['block-size'] != "0":
                HP.logger.info("NETWORK: Waiting %s bench @%s %d / %d"
                               " to finish on %d hosts (step = %d): should take"
                               " %d seconds" % (iter_bench['mode'], iter_bench['block-size'], nb_loops, len(hosts_series),
                                                iter_bench['nb-hosts'], iter_bench['step-hosts'],
                                                iter_bench['runtime']))
            else:
                HP.logger.info("NETWORK: Waiting %s bench %d / %d"
                               " to finish on %d hosts (step = %d): should take"
                               " %d seconds" % (iter_bench['mode'], nb_loops, len(hosts_series),
                                                iter_bench['nb-hosts'], iter_bench['step-hosts'],
                                                iter_bench['runtime']))

            init_jitter()

            start_network_bench(iter_bench)

            time.sleep(bench['runtime'])

            while (get_host_list(NETWORK_RUN).keys()):
                time.sleep(1)

            disable_jitter()

            compute_metrics(metrics_log_dir, iter_bench, HM.NETWORK)

            prepare_network_bench(iter_bench, HM.CLEAN)
    else:
        HP.logger.error("NETWORK: Canceling Test")
dataset/ETHPy150Open redhat-cip/edeploy/src/health-server.py/do_network_job/swapped operands of `%`