def escape_str(text):
    def replace(m):
        char = m.group(0)
        return escape_dict.get(char) or (ord(char) % '\\U%04x')

    return re_escape.sub(replace, text)
dataset/ETHPy150Open mikr/xcodeprojer/xcodeprojer.py/escape_str/swapped operands of `%`