public static void updateDocumentUnblockedAndCommitted(@NotNull PsiElement anchor, @NotNull Consumer<? super Document> consumer) {
    updateDocumentUnblockedAndCommitted(anchor, document -> {
      consumer.consume(document);
      return null;
    });
  }
public static void updateDocumentUnblockedAndCommitted(@NotNull PsiElement anchor, @NotNull Consumer<? super Document> consumer)