input: Write a python function to sort an array of integers by the sum of their digits.
  assert sort_by_sum_of_digits([126, 234, 21, 5]) == [5, 21, 126, 234]
  assert sort_by_sum_of_digits([12, 21, 11, 101]) == [11, 101, 12, 21]
  assert sort_by_sum_of_digits([33, 44, 55, 66]) == [33, 44, 55, 66]
output: def sort_by_sum_of_digits(arr):
      def digit_sum(n):
          return sum(int(digit) for digit in str(n))
      
      return sorted(arr, key=digit_sum)