code: public static <T> MapPartitionOperator<T, T> sample(
  		DataSet <T> input,
  		final boolean withReplacement,
  		final double fraction) {
  
  		return sample(input, withReplacement, fraction, Utils.RNG.nextLong());
  	}
docs: Generate a sample of DataSet by the probability fraction of each element.
  
  @param withReplacement Whether element can be selected more than once.
  @param fraction        Probability that each element is chosen, should be [0,1] without replacement,
  and [0, ∞) with replacement. While fraction is larger than 1, the elements are
  expected to be selected multi times into sample on average.
  @return The sampled DataSet