comefrom: <qiyuangong>056_Merge_Intervals_1.py
code: def merge( intervals):
      if intervals is None:
          return
      ls = len(intervals)
      if ls <= 1:
          return intervals
      intervals.sort(key=lambda x: x.start)
      pos = 0
      while pos < len(intervals) - 1:
          if intervals[pos].end >= intervals[pos + 1].start:
              next = intervals.pop(pos + 1)
              if next.end > intervals[pos].end:
                  intervals[pos].end = next.end
          else:
              pos += 1
      return intervals
masked: def sample_funcname ( var_0 ) :
      if var_0 is None :
          return
      var_1 = len ( var_0 )
      if var_1 <= 1 :
          return var_0
      var_0.sort ( var_2 = lambda var_3 : var_3.start )
      var_4 = 0
      while var_4 < len ( var_0 ) - 1 :
          if var_0 [ var_4 ].end >= var_0 [ var_4 + 1 ].start :
              var_5 = var_0.pop ( var_4 + 1 )
              if var_5.end > var_0 [ var_4 ].end :
                  var_0 [ var_4 ].end = var_5.end
          else :
              var_4 += 1
      return var_0
  