input: def insertion_sort(arr):
   """ Generate a Python function to execute a valid insertion sort on a given list of integers.
   >>> insertion_sort([34, 7, 23, 32, 5, 62])
   [5, 7, 23, 32, 34, 62]
   >>> insertion_sort([1, 2, 3, 4])
   [1, 2, 3, 4]
   """
   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 = j - 1
    arr[j + 1] = key
  
   return arr
output:     
      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 = j - 1
          arr[j + 1] = key
  
      return arr
  