def METHOD_NAME(self):
  k = 160
  n = 2 ** 20
  # create a sketch and inject ~1 million N(0,1) points as an array and as a single item
  kll = kll_floats_sketch(k)
  kll.update(np.random.normal(size=n-1))
  kll.update(0.0)
  # 0 should be near the median
  self.assertAlmostEqual(0.5, kll.get_rank(0.0), delta=0.035)
  # the median should be near 0
  self.assertAlmostEqual(0.0, kll.get_quantile(0.5), delta=0.035)
  # we also track the min/max independently from the rest of the data
  # which lets us know the full observed data range
  self.assertLessEqual(kll.get_min_value(), kll.get_quantile(0.01))
  self.assertLessEqual(0.0, kll.get_rank(kll.get_min_value()))
  self.assertGreaterEqual(kll.get_max_value(), kll.get_quantile(0.99))
  self.assertGreaterEqual(1.0, kll.get_rank(kll.get_max_value()))
  # we can also extract a list of values at a time,
  # here the values should give us something close to [-2, -1, 0, 1, 2].
  # then get the CDF, which will return something close to
  # the original values used in get_quantiles()
  # finally, can check the normalized rank error bound
  pts = kll.get_quantiles([0.0228, 0.1587, 0.5, 0.8413, 0.9772])
  cdf = kll.get_cdf(pts)  # include 1.0 at end to account for all probability mass
  self.assertEqual(len(cdf), len(pts)+1)
  err = kll.normalized_rank_error(False)
  self.assertEqual(err, kll_floats_sketch.get_normalized_rank_error(k, False))
  # and a few basic queries about the sketch
  self.assertFalse(kll.is_empty())
  self.assertTrue(kll.is_estimation_mode())
  self.assertEqual(kll.get_n(), n)
  self.assertEqual(kll.get_k(), k)
  self.assertLess(kll.get_num_retained(), n)
  # merging itself will double the number of items the sketch has seen
  # but need to do that with a copy
  kll_copy = kll_floats_sketch(kll)
  kll.merge(kll_copy)
  self.assertEqual(kll.get_n(), 2*n)
  # we can then serialize and reconstruct the sketch
  kll_bytes = kll.serialize()
  new_kll = kll_floats_sketch.deserialize(kll_bytes)
  self.assertEqual(kll.get_num_retained(), new_kll.get_num_retained())
  self.assertEqual(kll.get_min_value(), new_kll.get_min_value())
  self.assertEqual(kll.get_max_value(), new_kll.get_max_value())
  self.assertEqual(kll.get_quantile(0.7), new_kll.get_quantile(0.7))
  self.assertEqual(kll.get_rank(0.0), new_kll.get_rank(0.0))
  # A Kolmogorov-Smirnov Test of kll and new_kll should match, even for
  # a fairly small p-value -- cannot reject the null hypothesis that
  # they come from the same distribution (since they do)
  self.assertFalse(ks_test(kll, new_kll, 0.001))
  total_weight = 0
  for tuple in kll:
    item = tuple[0]
    weight = tuple[1]
    total_weight = total_weight + weight
  self.assertEqual(total_weight, kll.get_n())