Bread Pay checkout content can contain bracketed placeholders and formatting markers. Write a function that determines whether every bracket in a string is correctly matched and nested.
The supported bracket pairs are (), [], and {}. Ignore all non-bracket characters. A string is valid when every opening bracket has a matching closing bracket of the same type, and brackets close in last-in, first-out order.
Implement is_valid_brackets(s), where s is a string. Return a boolean: True if the bracket sequence is valid, otherwise False.
An empty string or a string containing no brackets is valid.
def is_valid_brackets(s):