input: Write a python function to calculate the total payment for each customer.
  assert total_payments([Customer(1, [50, 100, 150]), Customer(2, [75, 125, 175])]) == {1: 300, 2: 375}
  assert total_payments([Customer(3, [20, 30]), Customer(4, [10, 40, 50])]) == {3: 50, 4: 100}
  assert total_payments([Customer(5, [100, 200, 300]), Customer(6, [150, 250])]) == {5: 600, 6: 400}
output: def total_payments(customers):
      result = {}
      for customer in customers:
          result[customer.id] = sum(customer.payments)
      return result