src/main/java/io/reactivex/internal/operators/mixed/ScalarXMapZHelper.java
static <T, R> boolean tryAsMaybe(Object source,
            Function<? super T, ? extends MaybeSource<? extends R>> mapper,
            Observer<? super R> observer) {
        if (source instanceof Callable) {
            @SuppressWarnings("unchecked")
            Callable<T> call = (Callable<T>) source;
            MaybeSource<? extends R> cs = null;
            try {
                T item = call.call();
                if (item != null) {
                    cs = ObjectHelper.requireNonNull(mapper.apply(item), "The mapper returned a null MaybeSource");
                }
            } catch (Throwable ex) {
                Exceptions.throwIfFatal(ex);
                EmptyDisposable.error(ex, observer);
                return true;
            }

            if (cs == null) {
                EmptyDisposable.complete(observer);
            } else {
                cs.subscribe(MaybeToObservable.create(observer));
            }
            return true;
        }
        return false;
    }
static <T, R> boolean tryAsMaybe(Object source,
            Function<? super T, ? extends MaybeSource<? extends R>> mapper,
            Observer<? super R> observer) {
        if (source instanceof Callable) {
            @SuppressWarnings("unchecked")
            Callable<T> call = (Callable<T>) source;
            MaybeSource<? extends R> cs = null;
            try {
                T item = call.call();
                if (item != null) {
                    cs = ObjectHelper.requireNonNull(mapper.apply(item), "The mapper returned a null MaybeSource");
                }
            } catch (Throwable ex) {
                Exceptions.throwIfFatal(ex);
                EmptyDisposable.error(ex, observer);
                return true;
            }

            if (cs == null) {
                EmptyDisposable.complete(observer);
            } else {
                cs.subscribe(MaybeToObservable.create(observer));
            }
            return true;
        }
        return false;
    }
Try subscribing to a {@link MaybeSource} mapped from
a scalar source (which implements {@link Callable}).
@param <T> the upstream value type
@param source the source reactive type ({@code Flowable} or {@code Observable})
possibly implementing {@link Callable}.
@param mapper the function that turns the scalar upstream value into a
{@link MaybeSource}
@param observer the consumer to subscribe to the mapped {@link MaybeSource}
@return true if a subscription did happen and the regular path should be skipped