code: def merge(self, other, intersect=True):
      assert self.fieldname == other.fieldname
  
      start1 = self._comparable_start()
      start2 = other._comparable_start()
      end1 = self._comparable_end()
      end2 = other._comparable_end()
  
      if start1 >= start2 and end1 <= end2:
          start = start2
          end = end2
      elif start2 >= start1 and end2 <= end1:
          start = start1
          end = end1
      elif intersect:
          start = max(start1, start2)
          end = min(end1, end2)
      else:
          start = min(start1, start2)
          end = max(end1, end2)
  
      startval = None if start[0] is qcore.Lowest else start[0]
      startexcl = start[1] == 1
      endval = None if end[0] is qcore.Highest else end[0]
      endexcl = end[1] == -1
  
      boost = max(self.boost, other.boost)
      constantscore = self.constantscore or other.constantscore
  
      return self.__class__(
          self.fieldname,
          startval,
          endval,
          startexcl,
          endexcl,
          boost=boost,
          constantscore=constantscore,
      )
  
imports: from __future__ import division
  from whoosh.compat import b, u
  from whoosh.query import qcore, terms, compound, wrappers
  from whoosh.util.times import datetime_to_long
label_desc: Use image node_id 9 for calling the RangeMixin obj's underlying member method code with example usage: obj.merge(other, intersect) and returns: self