docs: public Iterable<DocumentRevsList> bulkReadDocsWithOpenRevisions(List<BulkGetRequest> request,
                                                                      boolean pullAttachmentsInline) {
          Map<String, Object> options = new HashMap<String, Object>();
          options.put("revs", true);
          options.put("latest", true);
  
          if (pullAttachmentsInline) {
              options.put("attachments", true);
          } else {
              options.put("attachments", false);
              options.put("att_encoding_info", true);
          }
          URI bulkGet = this.uriHelper.documentUri("_bulk_get", options);
          HttpConnection connection = Http.POST(bulkGet, "application/json");
          Map<String, List<BulkGetRequest>> jsonRequest = new HashMap<String, List<BulkGetRequest>>();
          jsonRequest.put("docs", request);
          // build request
          connection.setRequestBody(JSONUtils.toJson(jsonRequest));
          // deserialise response
          BulkGetResponse response = executeToJsonObjectWithRetry(connection, BulkGetResponse.class);
  
          Map<String, ArrayList<DocumentRevs>> revsMap = new HashMap<String,
                  ArrayList<DocumentRevs>>();
  
          // merge results back in, so there is one list of DocumentRevs per ID
          for (BulkGetResponse.Result result : response.results) {
              for (BulkGetResponse.Doc doc : result.docs) {
                  if (doc.ok != null) {
                      String id = doc.ok.getId();
                      if (!revsMap.containsKey(id)) {
                          revsMap.put(id, new ArrayList<DocumentRevs>());
                      }
                      revsMap.get(id).add(doc.ok);
                  }
              }
          }
  
          List<DocumentRevsList> allRevs = new ArrayList<DocumentRevsList>();
  
          // flatten out revsMap hash so that there is one entry in our return array for each ID
          for (ArrayList<DocumentRevs> value : revsMap.values()) {
              allRevs.add(new DocumentRevsList(value));
          }
          return allRevs;
      }