<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def trim_phonetics(root):
 """Function that trims phonetic markup from the root. Parameters root: str The string to remove the phonetic markup. Returns ------- str The string with phonetic markup removed. """

    global phonetic_markers
    global phonetic_regex
    if root in phonetic_markers:
        return root
    else:
        return phonetic_regex.sub('', root)