def clean_brackets(
    string,
    brackets=(("(", ")"),),
):
    """Removes matching brackets from the outside of a string
    Only supports single-character brackets
    """
    while len(string) > 1 and (string[0], string[-1]) in brackets:
        string = string[1:-1]
    return string