core/play/src/main/java/play/libs/streams/AkkaStreams.java
public static <In, FlowIn, Out> Flow<In, Out, ?> bypassWith(
      Function<In, F.Either<FlowIn, Out>> splitter, Flow<FlowIn, Out, ?> flow) {
    return bypassWith(
        Flow.<In>create().map(splitter::apply),
        play.api.libs.streams.AkkaStreams.onlyFirstCanFinishMerge(2),
        flow);
  }
public static <In, FlowIn, Out> Flow<In, Out, ?> bypassWith(
      Function<In, F.Either<FlowIn, Out>> splitter, Flow<FlowIn, Out, ?> flow) {
    return bypassWith(
        Flow.<In>create().map(splitter::apply),
        play.api.libs.streams.AkkaStreams.onlyFirstCanFinishMerge(2),
        flow);
  }
Bypass the given flow using the given splitter function.

<p>If the splitter function returns Left, they will go through the flow. If it returns Right,
they will bypass the flow.

<p>Uses onlyFirstCanFinishMerge(2) by default.

@param <In> the In type parameter for Flow
@param <FlowIn> the FlowIn type parameter for the left branch in Either.
@param <Out> the Out type parameter for Flow
@param flow the original flow
@param splitter the splitter function to use
@return the flow with a bypass.