def METHOD_NAME(
    base_count,
    count,
    bad_indices,
    base_delta,
    d_multiplier,
    add=True,
    do_ipv6=False,
    super_prefix=None,
    en_dbg=False,
):
    router_list = tgen.routers()
    tot_delta = float(0)
    optype = "adding" if add else "removing"
    iptype = "IPv6" if do_ipv6 else "IPv4"
    if super_prefix is None:
        super_prefix = u"2001::/48" if do_ipv6 else u"10.0.0.0/8"
    via = u"lo"
    optyped = "added" if add else "removed"
    for rname, router in router_list.items():
        router.logger.info("{} {} static {} routes".format(optype, count, iptype))
        # Generate config file.
        config_file = os.path.join(
            router.logdir, rname, "{}-routes-{}.conf".format(iptype.lower(), optype)
        )
        with open(config_file, "w") as f:
            for i, net in enumerate(
                get_ip_networks(super_prefix, base_count, count)
            ):
                if i in bad_indices:
                    if add:
                        f.write("ip route {} {} bad_input\n".format(net, via))
                    else:
                        f.write("no ip route {} {} bad_input\n".format(net, via))
                elif add:
                    f.write("ip route {} {}\n".format(net, via))
                else:
                    f.write("no ip route {} {}\n".format(net, via))
        # Enable debug
        if en_dbg:
            router.vtysh_cmd("debug northbound callbacks configuration")
        # Load config file.
        load_command = 'vtysh -f "{}"'.format(config_file)
        tstamp = datetime.datetime.now()
        output = router.run(load_command)
        delta = (datetime.datetime.now() - tstamp).total_seconds()
        tot_delta += delta
        router.logger.debug(
            "\nvtysh command => {}\nvtysh output <= {}\nin {}s".format(
                load_command, output, delta
            )
        )
    limit_delta = base_delta * d_multiplier
    logger.info(
        "{} {} {} static routes under {} in {}s (limit: {}s)".format(
            optyped, count, iptype.lower(), super_prefix, tot_delta, limit_delta
        )
    )
    if limit_delta:
        assert tot_delta <= limit_delta
    return tot_delta