def METHOD_NAME(self, completion=''):
    w = self.body_widget
    cpl = self.completer
    if not completion:
        completion = cpl.currentCompletion()
    if completion:
        cmpl = completion.split(None, 1)[0]
        prefix = cpl.completionPrefix()
        tc = w.textCursor()
        extra = len(cmpl) - len(prefix)
        tc.movePosition(tc.Left)
        tc.movePosition(tc.EndOfWord)
        tc.insertText(cmpl[-extra :])
        w.setTextCursor(tc)
    self.kill()