def write_text_to_file(dest, text, no_backup, in_place):
    """Write content into a file."""
    logger = logging.getLogger('retf')

    if not no_backup:
        logger.debug("Copying %s to backup file %s.orig.", dest, dest)
        shutil.copy2(dest, dest % "%s.orig")

    if not in_place:
        dest = "%s.retf" % dest

    logger.debug("Writing text to file %s.", dest)
    with open(dest, 'wb') as fpointer:
        fpointer.write(text)
dataset/ETHPy150Open openstack/openstack-doc-tools/cleanup/retf/retf.py/write_text_to_file/swapped operands of `%`