code: static BsonDocument getDocumentVersionDoc(final BsonDocument document) {
      if (document == null || !document.containsKey(DOCUMENT_VERSION_FIELD)) {
        return null;
      }
      return document.getDocument(DOCUMENT_VERSION_FIELD, null);
    }
docs: Returns the version document of the given document, if any; returns null otherwise.
  @param document the document to get the version from.
  @return the version of the given document, if any; returns null otherwise.