<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bracket_level(text, open={'(', '[', '{'}, close={')', ']', '}'}):
 """Return 0 if string contains balanced brackets or no brackets."""

    level = 0
    for c in text:
        if c in open:
            level += 1
        elif c in close:
            level -= 1
    return level