code: @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
      @CheckReturnValue
      @SchedulerSupport(SchedulerSupport.NONE)
      public static <T> Single<T> fromPublisher(final Publisher<? extends T> publisher) {
          ObjectHelper.requireNonNull(publisher, "publisher is null");
          return RxJavaPlugins.onAssembly(new SingleFromPublisher<T>(publisher));
      }
docs: Wraps a specific Publisher into a Single and signals its single element or error.
  <p>If the source Publisher is empty, a NoSuchElementException is signalled. If
  the source has more than one element, an IndexOutOfBoundsException is signalled.
  <p>
  The {@link Publisher} must follow the
  <a href="https://github.com/reactive-streams/reactive-streams-jvm#reactive-streams">Reactive-Streams specification</a>.
  Violating the specification may result in undefined behavior.
  <p>
  If possible, use {@link #create(SingleOnSubscribe)} to create a
  source-like {@code Single} instead.
  <p>
  Note that even though {@link Publisher} appears to be a functional interface, it
  is not recommended to implement it through a lambda as the specification requires
  state management that is not achievable with a stateless lambda.
  <p>
  <img width="640" height="322" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.fromPublisher.png" alt="">
  <dl>
  <dt><b>Backpressure:</b></dt>
  <dd>The {@code publisher} is consumed in an unbounded fashion but will be cancelled
  if it produced more than one item.</dd>
  <dt><b>Scheduler:</b></dt>
  <dd>{@code fromPublisher} does not operate by default on a particular {@link Scheduler}.</dd>
  </dl>
  @param <T> the value type
  @param publisher the source Publisher instance, not null
  @return the new Single instance
  @see #create(SingleOnSubscribe)