@NotNull
  public static String getElementIndent(@NotNull PsiElement anchor) {
    if (anchor instanceof PsiFile) {
      return "";
    }
    final PyAstStatementList statementList = getAnchorStatementList(anchor);
    if (statementList == null) {
      return "";
    }
    final PsiElement prevSibling = statementList.getPrevSibling();
    final String whitespace = prevSibling instanceof PsiWhiteSpace ? prevSibling.getText() : "";
    final int i = whitespace.lastIndexOf("\n");
    if (i >= 0 && statementList.getStatements().length != 0) {
      return whitespace.substring(i + 1);
    }
    else {
      return getExpectedBlockIndent(statementList);
    }
  }
@NotNull
  public static String getElementIndent(@NotNull PsiElement anchor)