def METHOD_NAME(self, event=None):
    if not self.tipwindow:
        # If the event was triggered by the same event that unbinded
        # this function, the function will be called nevertheless,
        # so do nothing in this case.
        return
    curline, curcol = map(int, self.widget.index("insert").split('.'))
    if curline < self.parenline or \
       (curline == self.parenline and curcol <= self.parencol) or \
       self.widget.compare("insert", ">", MARK_RIGHT):
        self.hidetip()
    else:
        self.position_window()
        if self.checkhide_after_id is not None:
            self.widget.after_cancel(self.checkhide_after_id)
        self.checkhide_after_id = \
            self.widget.after(CHECKHIDE_TIME, self.METHOD_NAME)