reactor-core/src/main/java/reactor/core/publisher/Operators.java
public static <O> Function<? super Publisher<O>, ? extends Publisher<O>> liftPublisher(
			Predicate<Publisher> filter,
			BiFunction<Publisher, ? super CoreSubscriber<? super O>, ? extends CoreSubscriber<? super O>> lifter) {
		return LiftFunction.liftPublisher(filter, lifter);
	}
public static <O> Function<? super Publisher<O>, ? extends Publisher<O>> liftPublisher(
			Predicate<Publisher> filter,
			BiFunction<Publisher, ? super CoreSubscriber<? super O>, ? extends CoreSubscriber<? super O>> lifter) {
		return LiftFunction.liftPublisher(filter, lifter);
	}
Create a function that can be used to support a custom operator via
{@link CoreSubscriber} decoration. The function is compatible with
{@link Flux#transform(Function)}, {@link Mono#transform(Function)},
{@link Hooks#onEachOperator(Function)} and {@link Hooks#onLastOperator(Function)},
and works with the raw {@link Publisher} as input, which is useful if you need to
detect the precise type of the source (eg. instanceof checks to detect Mono, Flux,
true Scannable, etc...).

<p>
The function will be invoked only if the passed {@link Predicate} matches.
Therefore the transformed type O must be the same than the input type since
unmatched predicate will return the applied {@link Publisher}.

@param filter the {@link Predicate} that the raw {@link Publisher} must pass for
the transformation to occur
@param lifter the {@link BiFunction} taking the raw {@link Publisher} and
{@link CoreSubscriber}. The publisher can be double-checked (including with
{@code instanceof}, and the function must return a receiving {@link CoreSubscriber}
that will immediately subscribe to the {@link Publisher}.

@param <O> the input and output type

@return a new {@link Function}