docs: def _get_nr_bins(count):
      """depending on the number of data points, compute a best guess for an
      optimal number of bins
  
      https://en.wikipedia.org/wiki/Histogram#Number_of_bins_and_width
      """
      if count <= 30:
          # use the square-root choice, used by Excel and Co
          k = np.ceil(np.sqrt(count))
      else:
          # use Sturges' formula
          k = np.ceil(np.log2(count)) + 1
      return int(k)