private static boolean ifFoldBlocks(ASTNode statementList, IElementType parentType) {
    if (!PyElementTypes.PARTS.contains(parentType) && parentType != PyElementTypes.WITH_STATEMENT) {
      return false;
    }
    PsiElement element = statementList.getPsi();
    if (element instanceof PyStatementList) {
      return StringUtil.countNewLines(element.getText()) > 0;
    }
    return false;
  }
private static boolean ifFoldBlocks(ASTNode statementList, IElementType parentType)