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