def token_density(precision: 2)
      token_frequency.each_with_object({}) { |(token, freq), hash|
        hash[token] = (freq / token_count.to_f).round(precision)
      }.sort_by_value_desc
    end
def token_density(precision: 2)
      token_frequency.each_with_object({}) { |(token, freq), hash|
        hash[token] = (freq / token_count.to_f).round(precision)
      }.sort_by_value_desc
    end
Returns a sorted two-dimensional array where each member array is a token and its density
 as a float, rounded to a precision of two decimal places. It accepts a precision argument
 which defaults to `2`.

 @example
  Counter.new(%w[Maj. Major Major Major]).token_density
  # => [ ['major', .75], ['maj', .25] ]

 @example with `precision`
  Counter.new(%w[Maj. Major Major Major]).token_density(precision: 4)
  # => [ ['major', .7500], ['maj', .2500] ]

 @param [Integer] precision    The number of decimal places to round density to
 @return [Array<Array<String, Float>>] An array of tokens and their densities