private static boolean isIndentNext(@NotNull ASTNode child) {
    final PsiElement psi = PsiTreeUtil.getParentOfType(child.getPsi(), PyAstStatement.class);

    return psi instanceof PyAstIfStatement ||
           psi instanceof PyAstForStatement ||
           psi instanceof PyAstWithStatement ||
           psi instanceof PyAstClass ||
           psi instanceof PyAstFunction ||
           psi instanceof PyAstTryExceptStatement ||
           psi instanceof PyAstElsePart ||
           psi instanceof PyAstIfPart ||
           psi instanceof PyAstWhileStatement;
  }
private static boolean isIndentNext(@NotNull ASTNode child)