code: func scaleHeapSample(count, size, rate int64) (int64, int64) {
  	if count == 0 || size == 0 {
  		return 0, 0
  	}
  
  	if rate <= 1 {
  		// if rate==1 all samples were collected so no adjustment is needed.
  		// if rate<1 treat as unknown and skip scaling.
  		return count, size
  	}
  
  	avgSize := float64(size) / float64(count)
  	scale := 1 / (1 - math.Exp(-avgSize/float64(rate)))
  
  	return int64(float64(count) * scale), int64(float64(size) * scale)
  }
docs: // scaleHeapSample adjusts the data from a heapz Sample to
  // account for its probability of appearing in the collected
  // data. heapz profiles are a sampling of the memory allocations
  // requests in a program. We estimate the unsampled value by dividing
  // each collected sample by its probability of appearing in the
  // profile. heapz v2 profiles rely on a poisson process to determine
  // which samples to collect, based on the desired average collection
  // rate R. The probability of a sample of size S to appear in that
  // profile is 1-exp(-S/R).