def METHOD_NAME(self):
    self._clear()
    if (
        not get_workbench().get_option("view.name_highlighting")
        or not self.text.is_python_text()
    ):
        return
    def consider_request():
        if time.time() - self.text.get_last_operation_time() < 0.3:
            # wait a bit more, there may be more keypresses or cursor location changes coming
            self.text.after(100, consider_request)
        else:
            try:
                self._request()
            finally:
                self._request_scheduled = False
    if not self._request_scheduled:
        self._request_scheduled = True
        self.text.after_idle(consider_request)