void (PsiElement expression) { if (expression != null && PsiTreeUtil.getParentOfType(expression, PyImportStatementBase.class, false) == null) { final PyExpression replacement = invertExpression(expression); expression.replace(replacement); } }