input: Write a function to generate a set of Python functions to process a list of objects, where each object contains an ID and a list of inputs. The function should return a list of results, where each result includes the object's ID and the sum of its inputs. If the object's inputs are empty, the result should be 0.
  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": 1, "inputs": []}, {"id": 2, "inputs": [5]}])==[{'id': 1, 'result': 0}, {'id': 2, 'result': 5}]
  assert calculate_result([{"id": 1, "inputs": [10, -5]}, {"id": 2, "inputs": [3, 3]}])==[{'id': 1, 'result': 5}, {'id': 2, 'result': 6}]
  assert calculate_result([])==[]
output: 
  def calculate_result(objects):
      if not objects:
          return []
      return [{'id': obj['id'], 'result': sum(obj['inputs']) if obj['inputs'] else 0} for obj in objects]
  