问题描述:
Write a function to compute the sum of digits of each number of a given list.

测试用例:
['assert sum_of_digits([10,2,56])==14', "assert sum_of_digits([[10,20,4,5,'b',70,'a']])==19", 'assert sum_of_digits([10,20,-4,5,-70])==19']

生成的代码:
def sum_of_digits(numbers):
    total_sum = 0
    for number in numbers:
        if isinstance(number, int):
            total_sum += sum(int(digit) for digit in str(abs(number)))
    return total_sum

# Test cases
assert sum_of_digits([10, 2, 56]) == 14
assert sum_of_digits([10, 20, 4, 5, 'b', 70, 'a']) == 19
assert sum_of_digits([10, 20, -4, 5, -70]) == 19