def count_unbalanced_brackets(line):
    """Return number of unmatched open/close brackets."""
    count = 0
    for opening, closing in ['()', '[]', '{}']:
        count += abs(line.count(opening) - line.count(closing))

    return count
dataset/ETHPy150Open jdf/processing.py/mode/formatter/autopep8.py/count_unbalanced_brackets/original