code: public void normalize() {
          for (T key : keySet()) {
              setCount(key, getCount(key) / totalCount.get());
          }
  
          rebuildTotals();
      }
docs: This method will apply normalization to counter values and totals.