String (PyStringLiteralExpression stringLiteralExpression) { final PyStatementList statementList = PsiTreeUtil.getParentOfType(stringLiteralExpression, PyStatementList.class); String indent = ""; if (statementList != null) { final PsiElement whiteSpace = statementList.getPrevSibling(); if (whiteSpace instanceof PsiWhiteSpace) indent = whiteSpace.getText(); else indent = "\n"; } return indent; }