code: def __init__(self, doc_count, field_length):
      self.N = doc_count
      self.collection_total = field_length
  
      if self.N:
          self.mean_length = self.collection_total / self.N
      else:
          self.mean_length = 0
  
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 to create a new ExpansionModel object from inherited base classes: object with example: obj = ExpansionModel(doc_count, field_length)