code: @CheckReturnValue
      @SchedulerSupport(SchedulerSupport.NONE)
      public static <T, S> Observable<T> generate(Callable<S> initialState, BiFunction<S, Emitter<T>, S> generator,
              Consumer<? super S> disposeState) {
          ObjectHelper.requireNonNull(initialState, "initialState is null");
          ObjectHelper.requireNonNull(generator, "generator  is null");
          ObjectHelper.requireNonNull(disposeState, "disposeState is null");
          return RxJavaPlugins.onAssembly(new ObservableGenerate<T, S>(initialState, generator, disposeState));
      }
docs: Returns a cold, synchronous and stateful generator of values.
  <p>
  <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/generate.2.png" alt="">
  <dl>
  <dt><b>Scheduler:</b></dt>
  <dd>{@code generate} does not operate by default on a particular {@link Scheduler}.</dd>
  </dl>
  
  @param <S> the type of the per-Observer state
  @param <T> the generated value type
  @param initialState the Callable to generate the initial state for each Observer
  @param generator the Function called with the current state whenever a particular downstream Observer has
  requested a value. The callback then should call {@code onNext}, {@code onError} or
  {@code onComplete} to signal a value or a terminal event and should return a (new) state for
  the next invocation. Signalling multiple {@code onNext}
  in a call will make the operator signal {@code IllegalStateException}.
  @param disposeState the Consumer that is called with the current state when the generator
  terminates the sequence or it gets disposed
  @return the new Observable instance