private @NotNull DocumentReference createFromDocument(final @NotNull Document document) {
    DocumentReference result = myDocToRef.get(document);
    if (result == null) {
      result = new DocumentReferenceByDocument(document);
      myDocToRef.put(document, result);
    }
    return result;
  }
private @NotNull DocumentReference createFromDocument(final @NotNull Document document)