human
Complete this python program:
def _escape_tex_reserved_symbols(input):
assistant
#Here is the Python program you requested.

    """Escapes all TeX reserved symbols (\_\, \~\, etc.) in a string.
    :param input: String to escape
    """
    def replace(match):
        return TEX_RESERVED_SYMBOLS_MAP[match.group()]
    return TEX_RESERVED_SYMBOLS_RE.sub(replace, input)