comefrom: <doocs>0056.Merge Intervals_1.py
code: def merge( intervals: List[List[int]]) -> List[List[int]]:
      intervals.sort()
      ans = []
      st, ed = intervals[0]
      for s, e in intervals[1:]:
          if ed < s:
              ans.append([st, ed])
              st, ed = s, e
          else:
              ed = max(ed, e)
      ans.append([st, ed])
      return ans
masked: def sample_funcname ( var_0 : List [ List [ int ] ] ) -> List [ List [ int ] ] :
      var_0.sort ( )
      var_4 = [ ]
      var_6 , var_7 = var_0 [ 0 ]
      for var_9 , var_10 in var_0 [ 1 : ] :
          if var_7 < var_9 :
              var_4.append ( [ var_6 , var_7 ] )
              var_6 , var_7 = var_9 , var_10
          else :
              var_7 = max ( var_7 , var_10 )
      var_4.append ( [ var_6 , var_7 ] )
      return var_4
  