input: Write a python function to sort an array using insertion sort.
  assert insertion_sort([7, 8, 5, 4, 1, 9, 6, 3, 2]) == [1, 2, 3, 4, 5, 6, 7, 8, 9]
  assert insertion_sort([5, 3, 8, 4, 2]) == [2, 3, 4, 5, 8]
  assert insertion_sort([10, 1, 3, 9, 7]) == [1, 3, 7, 9, 10]
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