input: Write a function to calculate a result for each object in a list of objects. The function should take a list of objects where each object has an 'id' and 'inputs' field. The function should return a list of dictionaries, each containing the 'id' and the sum of the 'inputs' for each object. If the input list is empty, the function should return an empty list.
  assert calculate_result([{"id": 1, "inputs": [1,2,3]}, {"id": 2, "inputs": [2,3,4]}])==[{'id': 1, 'result': 6}, {'id': 2, 'result': 9}]
  assert calculate_result([{"id": 3, "inputs": [5,5,5]}])==[{'id': 3, 'result': 15}]
  assert calculate_result([])==[]
output: def calculate_result(objects):
      return [{'id': obj['id'], 'result': sum(obj['inputs'])} for obj in objects]