InsertHandler<LookupElement> (PsiElement parent) { if (parent instanceof PyStringLiteralExpression) { return getStringLiteralInsertHandler(); } if (parent.getParent() instanceof PyDecorator) { return getImportingInsertHandler(); } return getFunctionInsertHandler(); }