def METHOD_NAME(self, tag: str):
    if tag in self.open_tags:
        remove_indent = 0
        while True:
            t = self.open_tags.pop()
            if t not in NO_INDENT_TAGS:
                remove_indent += INDENT
            if t == tag:
                break
        self.indent = self.indent[:-remove_indent]
    else:
        pass  # this closing tag has no start tag. let's keep indentation as-is.