public static <InputT> GlobalSketch<InputT> globally() {
    return GlobalSketch.<InputT>builder().build();
  }
@Test
  public void globallyWithTunedParameters() {
    double eps = 0.01;
    double conf = 0.8;
    PCollection<Long> stream = tp.apply(Create.of(smallStream));
    PCollection<Sketch<Long>> sketch =
        stream.apply(
            SketchFrequencies.<Long>globally().withRelativeError(eps).withConfidence(conf));

    Coder<Long> coder = stream.getCoder();

    PAssert.thatSingleton("Verify number of hits", sketch)
        .satisfies(new VerifyStreamFrequencies<>(coder, distinctElems, frequencies));

    tp.run();
  }