def bash_wrap(cmd_str):
    """Escape single quotes in a shell command string and wrap it with ``bash
    -c '<string>'``.

    This low-tech replacement works because we control the surrounding string
    and single quotes are the only character in a single-quote string that
    needs escaping.
    """
    return cmd_str.replace("'", "'\\''") % "bash -c '%s'"
dataset/ETHPy150Open Yelp/mrjob/mrjob/util.py/bash_wrap/swapped operands of `%`