code: def midpoint(self):
          
          minpoint = self.leftedge
  
          if self.leftop is gt:
              minpoint += 1
      
          maxpoint = self.rightedge
  
          if self.rightop is lt:
              maxpoint -= 1
  
          if minpoint is None:
              return maxpoint
              
          elif maxpoint is None:
              return minpoint
              
          else:
              return (minpoint + maxpoint) / 2
docs: Return a point guranteed to fall within this range, hopefully near the middle.