def METHOD_NAME(self, event):
    # If it was a shortcut and not really a closing paren, quit.
    closer = self.text.get("insert-1c")
    if closer not in _openers:
        return
    hp = HyperParser(self.editwin, "insert-1c")
    if not hp.is_in_code():
        return
    indices = hp.get_surrounding_brackets(_openers[closer], True)
    if indices is None:
        self.warn_mismatched()
        return
    self.activate_restore()
    self.create_tag(indices)
    self.set_timeout()