code: @Beta
      public static <T> Predicate<T> sp(final Object mutex, final Predicate<T> predicate) {
          N.checkArgNotNull(mutex, "mutex");
          N.checkArgNotNull(predicate, "predicate");
  
          return new Predicate<T>() {
              @Override
              public boolean test(T t) {
                  synchronized (mutex) {
                      return predicate.test(t);
                  }
              }
          };
      }
docs: Synchronized {@code Predicate}
  
  @param mutex to synchronized on
  @param predicate
  @return