docs: def _merge_skyline(self, skylineq, segment):
          """
          Arguments:
              skylineq (collections.deque):
              segment (HSegment):
          """
          if len(skylineq) == 0:
              skylineq.append(segment)
              return
  
          if skylineq[-1].top == segment.top:
              s = skylineq[-1]
              skylineq[-1] = HSegment(s.start, s.length+segment.length)
          else:
              skylineq.append(segment)