Determine if brackets are balanced

Balanced brackets

{ }
{ } { }
( ( { [ ] } ) )

Unbalanced brackets

( ( )
{ { { ) } ]
[ ] [ ] ] ]

This code is reliant on the Stack class

from stack import Stack


def is_match(p1, p2):
    if p1 == "(" and p2 == ")":
        return True
    elif p1 == "{" and p2 == "}":
        return True
    elif p1 == "[" and p2 == "]":
        return True
    else:
        return False


def is_paren_balanced(paren_string):
    s = Stack()
    is_balanced = True
    index = 0

    # while 0 < 2 and is_balanced == True
    while index < len(paren_string) and is_balanced:
        paren = paren_string[index]
        if paren in "([{":
            s.push(paren)
        else:
            if s.is_empty():
                is_balanced = False
                break
            else:
                top = s.pop()
                if not is_match(top, paren):
                    is_balanced = False
                    break
        index += 1

    if s.is_empty() and is_balanced:
        return True
    else:
        return False


if __name__ == "__main__":
    print(is_paren_balanced("()"))
    print(is_paren_balanced("[()"))