NetApp ONTAP configuration and access expressions can contain nested grouping symbols alongside identifiers, operators, and whitespace. Implement a validator that determines whether every bracket is correctly opened, nested, and closed.
Given a string expression, return True if all parentheses (), square brackets [], and curly braces {} are balanced. Ignore all characters that are not brackets. A closing bracket is valid only when it matches the most recently opened unmatched bracket.
The input is a string, and the output is a Boolean. An empty string or a string containing no brackets is balanced.
def is_balanced(expression):