input: Write a function that sorts a list of n distinct integers using the insertion sort algorithm. The function should return the sorted list. If the input list is empty, the function should return an empty list as well.
  def insertion_sort(arr):
      for i in range(1, len(arr)): 
    
          key = arr[i] 
    
          # Move elements of arr[0..i-1], 
          # that are greater than key, 
          # to one position ahead of 
          # their current position 
          j = i-1
          while j >= 0 and key < arr[j] : 
                  arr[j + 1] = arr[j] 
                  j -= 1
          arr[j + 1] = key
      return arr
  
  assert insertion_sort([4, 3, 2, 10, 12, 1, 5, 6])==[1, 2, 3, 4, 5, 6, 10, 12]
  assert insertion_sort([12, 11, 13, 5, 6])==[5, 6, 11, 12, 13]
  assert insertion_sort([3, 8, 5, 2, 9, 1])==[1, 2, 3, 5, 8, 9]
  assert insertion_sort([])==[]
output: def insertion_sort(arr):
      for i in range(1, len(arr)): 
          key = arr[i] 
          j = i-1
          while j >= 0 and key < arr[j] : 
                  arr[j + 1] = arr[j] 
                  j -= 1
          arr[j + 1] = key
      return arr