docs: @RequiresApi(Build.VERSION_CODES.KITKAT)
      @NonNull
      public static ProviderClient getProviderClient(
              @NonNull final Context context,
              @NonNull final String authority) {
          final Uri contentUri = new Uri.Builder()
                  .scheme(ContentResolver.SCHEME_CONTENT)
                  .authority(authority)
                  .build();
          return new ProviderClient() {
              @NonNull
              @Override
              public Uri getContentUri() {
                  return contentUri;
              }
  
              @Nullable
              @Override
              public com.google.android.apps.muzei.api.provider.Artwork getLastAddedArtwork() {
                  try (Cursor data = context.getContentResolver().query(
                          contentUri,
                          null, null, null,
                          BaseColumns._ID + " DESC")) {
                      return data != null && data.moveToFirst()
                              ? com.google.android.apps.muzei.api.provider.Artwork.fromCursor(data)
                              : null;
                  }
              }
  
              @Nullable
              @Override
              public Uri addArtwork(@NonNull final com.google.android.apps.muzei.api.provider.Artwork artwork) {
                  ContentResolver contentResolver = context.getContentResolver();
                  return contentResolver.insert(contentUri, artwork.toContentValues());
              }
  
              @NonNull
              @Override
              public List<Uri> addArtwork(@NonNull final Iterable<com.google.android.apps.muzei.api.provider.Artwork> artwork) {
                  ContentResolver contentResolver = context.getContentResolver();
                  ArrayList<ContentProviderOperation> operations = new ArrayList<>();
                  for (com.google.android.apps.muzei.api.provider.Artwork art : artwork) {
                      operations.add(ContentProviderOperation.newInsert(contentUri)
                              .withValues(art.toContentValues())
                              .build());
                  }
                  ArrayList<Uri> resultUris = new ArrayList<>(operations.size());
                  try {
                      ContentProviderResult[] results = contentResolver.applyBatch(
                              authority, operations);
                      for (ContentProviderResult result : results) {
                          resultUris.add(result.uri);
                      }
                  } catch (OperationApplicationException|RemoteException ignored) {
                  }
                  return resultUris;
              }
  
              @Nullable
              @Override
              public Uri setArtwork(@NonNull final com.google.android.apps.muzei.api.provider.Artwork artwork) {
                  ContentResolver contentResolver = context.getContentResolver();
                  ArrayList<ContentProviderOperation> operations = new ArrayList<>();
                  operations.add(ContentProviderOperation.newInsert(contentUri)
                          .withValues(artwork.toContentValues())
                          .build());
                  operations.add(ContentProviderOperation.newDelete(contentUri)
                          .withSelection(BaseColumns._ID + " != ?", new String[1])
                          .withSelectionBackReference(0, 0)
                          .build());
                  try {
                      ContentProviderResult[] results = contentResolver.applyBatch(
                              authority, operations);
                      return results[0].uri;
                  } catch (OperationApplicationException|RemoteException e) {
                      return null;
                  }
              }
  
              @NonNull
              @Override
              public List<Uri> setArtwork(@NonNull final Iterable<com.google.android.apps.muzei.api.provider.Artwork> artwork) {
                  ContentResolver contentResolver = context.getContentResolver();
                  ArrayList<ContentProviderOperation> operations = new ArrayList<>();
                  for (com.google.android.apps.muzei.api.provider.Artwork art : artwork) {
                      operations.add(ContentProviderOperation.newInsert(contentUri)
                              .withValues(art.toContentValues())
                              .build());
                  }
                  long currentTime = System.currentTimeMillis();
                  ArrayList<Uri> resultUris = new ArrayList<>(operations.size());
                  try {
                      ContentProviderResult[] results = contentResolver.applyBatch(
                              authority, operations);
                      for (ContentProviderResult result : results) {
                          resultUris.add(result.uri);
                      }
                      ArrayList<ContentProviderOperation> deleteOperations = new ArrayList<>();
                      try (Cursor data = context.getContentResolver().query(
                              contentUri,
                              new String[] { BaseColumns._ID },
                              Artwork.DATE_MODIFIED + "<?",
                              new String[] { Long.toString(currentTime)},
                              null)) {
                          while (data != null && data.moveToNext()) {
                              Uri artworkUri = ContentUris.withAppendedId(contentUri,
                                      data.getLong(0));
                              if (!resultUris.contains(artworkUri)) {
                                  deleteOperations.add(ContentProviderOperation
                                          .newDelete(artworkUri)
                                          .build());
                              }
                          }
                      }
                      if (!deleteOperations.isEmpty()) {
                          contentResolver.applyBatch(authority, deleteOperations);
                      }
                  } catch (OperationApplicationException|RemoteException ignored) {
                  }
                  return resultUris;
              }
          };
      }