input: def sort_by_digit_sum(arr):
      """
      Write a function that sorts an array of integers in ascending order based on the sum of their digits.
      Note: In cases where multiple integers have the same digit sum, maintain their original order.
  
      For instance:
      >>> sort_by_digit_sum([1, 11, -1, -11, -12]) == [-1, -11, 1, -12, 11]
      >>> sort_by_digit_sum([]) == []
      """
output:     return sorted(arr, key=lambda x: (sum(int(d) for d in str(abs(x))), arr.index(x)))