input: Write a python function to implement insertion sort algorithm.
  assert insertion_sort([21, 3, 14, 15, 5, 21]) == [3, 5, 14, 15, 21, 21]
  assert insertion_sort([5, 2, 9, 1, 5, 6]) == [1, 2, 5, 5, 6, 9]
  assert insertion_sort([4, 3, 2, 10, 12, 1, 5, 6]) == [1, 2, 3, 4, 5, 6, 10, 12]
output: def insertion_sort(arr):
      for i in range(1, arr.length):
          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