human
Complete the below
def _escape_tex_reserved_symbols(input):

    ''''Escapes all TeX reserved symbols (\'_\', \'~\', etc.) in a string.
    :param input: String to escape'
    '''

=====
What is a the Python program you requested?
assistant
#Here is the Python program you requested.
    def replace(match):
        return TEX_RESERVED_SYMBOLS_MAP[match.group()]
    return TEX_RESERVED_SYMBOLS_RE.sub(replace, input)