code: public static <T,K,V> Observable.Transformer<T,ImmutableMap<K,V>> toImmutableMap(final Func1<T,K> keyMapper, final Func1<T,V> valueMapper) {
          return new Observable.Transformer<T,ImmutableMap<K,V>>() {
              @Override
              public Observable<ImmutableMap<K, V>> call(Observable<T> observable) {
                  return observable.collect(new Func0<ImmutableMap.Builder<K, V>>() {
                      @Override
                      public ImmutableMap.Builder<K, V> call() {
                          return ImmutableMap.builder();
                      }
                  }, new Action2<ImmutableMap.Builder<K, V>, T>() {
                      @Override
                      public void call(ImmutableMap.Builder<K, V> builder, T t) {
                          builder.put(keyMapper.call(t), valueMapper.call(t));
                      }
                  })
                  .map(new Func1<ImmutableMap.Builder<K, V>, ImmutableMap<K, V>>() {
                      @Override
                      public ImmutableMap<K, V> call(ImmutableMap.Builder<K, V> builder) {
                          return builder.build();
                      }
                  });
              }
          };
      }
docs: Returns a Transformer&lt;T,ImmutableMap&lt;K,V&gt;&gt that maps an Observable&lt;T&gt; to an Observable&lt;ImmutableMap&lt;K,V&gt;&gt><br><br>
  with a given Func1&lt;T,K&gt; keyMapper and Func1&lt;T,V&gt; valueMapper