def gen_parens(self, args):
    import re
    result = re.sub('\\\\[A-Za-z]*', '\\g<0>!!!!', ''.join(args)).replace(' ', '').replace('!!!!', ' ').strip()
    return (('(' + result) + ')')
def gen_parens(self, args):
    import re
    result = re.sub('\\\\[A-Za-z]*', '\\g<0>!!!!', .join(args)).replace(' ', ).replace('!!!!', ' ').strip()
    return (('(' + result) + ')')