def correctParenTrail(result, indentX):
    parens = ""

    while len(result['parenStack']) > 0:
        opener = peek(result['parenStack'])
        if indentX >= opener['x']:
            result['parenStack'].pop()
            parens = parens + PARENS[opener['ch']]
        else:
            break

    insertWithinLine(result, result['parenTrail']['lineNo'], result['parenTrail']['startX'], parens)
dataset/ETHPy150Open oakmac/sublime-text-parinfer/parinfer.py/correctParenTrail/swapped operands of `>=`