private Optional<String> getPhotosPaginationToken(Optional<PaginationData> paginationData) {
    Optional<String> paginationToken = Optional.empty();
    if (paginationData.isPresent()) {
      String token = ((StringPaginationToken) paginationData.get()).getToken();
      Preconditions.checkArgument(
          token.startsWith(MEDIA_TOKEN_PREFIX), "Invalid pagination token " + token);
      if (token.length() > MEDIA_TOKEN_PREFIX.length()) {
        paginationToken = Optional.of(token.substring(MEDIA_TOKEN_PREFIX.length()));
      }
    }
    return paginationToken;
  }
Method for storing a list of all photos that are already contained in albums
extensions/data-transfer/portability-data-transfer-google/src/main/java/org/datatransferproject/datatransfer/google/media/GoogleMediaExporter.java