input: Write a function to improve the following Python code that calculates the sum of elements of a list. The improved code should be more concise and efficient. The function header and assert statements should be included to verify the correctness of the solution.
  
  def sum_elements(arr):
      return sum(arr)  # return sum of elements of arr with one line of code.
  
  assert sum_elements([1, 2, 3, 4, 5]) == 15
  assert sum_elements([10, -5, 3, 7]) == 15
  assert sum_elements([]) == 0
  assert sum_elements([-1, -2, -3, -4, -5]) == -15
output: def sum_elements(arr):
      return sum(arr)