input: Write a function to calculate the sum of the digits of a given number. The function should take an integer as input and return the sum of its digits.
  assert digit_sum(6342)==15
  assert digit_sum(12345)==15
  assert digit_sum(9876)==30
  assert digit_sum(0)==0
  assert digit_sum(543210)==15
output: def digit_sum(n):
      return sum(int(digit) for digit in str(abs(n)))