code: def normalizer(self, maxweight, top_total):
      if not self.collection_total:
          return maxweight
      return (
          maxweight
          * log(self.collection_total / top_total)
          / log(2.0)
          * top_total
      )
  
imports: from __future__ import division
  import random
  from collections import defaultdict
  from math import log
  from whoosh.compat import xrange, iteritems
label_desc: Use image node_id 1 for calling the KLModel obj's underlying member method code with example usage: obj.normalizer(maxweight, top_total) and returns: unknown, maxweight