input: Write a python function to calculate the sum of all elements in a matrix.
  assert matrix_sum([[1, 2], [3, 4]]) == 10
  assert matrix_sum([[5, 5], [5, 5]]) == 20
  assert matrix_sum([[1, 0, -1], [0, 0, 0], [-1, 0, 1]]) == 0
output: def matrix_sum(matrix):
      return sum(sum(row) for row in matrix)