text: def merge_sort(items):
      if len(items) <= 1:
          return items
  # split
      middle_index = len(items) // 2
      left_split = items[:middle_index]
      right_split = items[middle_index:]
  
      return middle_index, left_split, right_split
  
  # re-merge
  def merge(left, right):
      result = []
  
      while (left and right):
        if left[0] < right[0]:
          result.append(left[0])
          left.pop(0)
        else:
          result.append(right[0])
          right.pop(0)
  
      return result
  
  
  
  