code: private static BsonDocument sanitizeCachedDocument(
            final MongoCollection<BsonDocument> localCollection,
            final BsonDocument document,
            final BsonValue documentId
    ) {
      if (document == null) {
        return null;
      }
      if (document.containsKey(DOCUMENT_VERSION_FIELD)) {
        final BsonDocument clonedDoc = sanitizeDocument(document);
  
        final BsonDocument removeVersionUpdate =
                new BsonDocument("$unset",
                        new BsonDocument(DOCUMENT_VERSION_FIELD, new BsonInt32(1))
                );
  
        localCollection.findOneAndUpdate(getDocumentIdFilter(documentId), removeVersionUpdate);
        return clonedDoc;
      }
  
      return document;
    }
docs: Given a local collection, a document fetched from that collection, and its _id, ensure that
  the document does not contain forbidden fields (currently just the document version field),
  and remove them from the document and the local collection. If no changes are made, the
  original document reference is returned. If changes are made, a cloned copy of the document
  with the changes will be returned.
  
  @param localCollection the local MongoCollection from which the document was fetched
  @param document the document fetched from the local collection. this argument may be mutated
  @param documentId the _id of the fetched document (taken as an arg so that if the caller
  already knows the _id, the document need not be traversed to find it)
  @return a BsonDocument without any forbidden fields.