def METHOD_NAME(self):
    text = self.text()
    text_under_cursor = ""
    i = self.cursorPosition() - 1
    while i >= 0 and text[i] not in self._separators:
        text_under_cursor = text[i] + text_under_cursor
        i -= 1
    return text_under_cursor