The dataclass Grocery represents an item at a grocery store, and is defined below with the fields item (str), cost (int), and on_sale (boolean).

Define a function sum_sale that consumes a list of Grocery and produces an integer representing the sum of all their costs, but only include items that are on sale. Unit test this function a suitable number of times.