(self)
return totals
Returns:
            dict: In the form { (item_id, metadata) -> amount }
Returns:
            dict: In the form { (item_id, metadata) -> amount }
Returns : dict : In the form { ( item_id metadata ) - > amount }
def total_ingredient_amounts(self):
        """
        Returns:
            dict: In the form { (item_id, metadata) -> amount }
        """
        totals = defaultdict(int)
        for id, meta, amount in self.ingredients:
            totals[(id, meta)] += amount
        return totals
def total_ingredient_amounts ( self ) : totals = defaultdict ( int ) for id , meta , amount in self . ingredients : totals [ ( id , meta ) ] += amount return totals