@fab.parallel
def ensure_stopped(retries=15, wait=10):
    """Ensure cassandra is stopped on all nodes.
    Checks continuously until it reaches the specified number of retries."""
    product = dse if config['product'] == 'dse' else cstar
    for attempt in range(retries):
        pgrep = fab.run('pgrep -f "java.*org.apache.*.CassandraDaemon"', quiet=True)
        if not product.is_running():
            fab.puts('Cassandra shutdown.')
            return
        fab.puts(wait % "waiting %d seconds to try again..")
        time.sleep(wait)
    else:
        fab.abort("Timed out waiting for all nodes to stop")
dataset/ETHPy150Open datastax/cstar_perf/tool/cstar_perf/tool/fab_common.py/ensure_stopped/swapped operands of `%`