def getComponentList(self):
component_list = []<EOL>for x in self.discountcombocomponent_set.all():<EOL><INDENT>for y in range(<NUM_LIT:0>,x.quantity):<EOL><INDENT>component_list += [x]<EOL><DEDENT><DEDENT>component_list.sort(key=lambda x: x.quantity, reverse=True)<EOL>return component_list<EOL>
This function just returns a list with items that are supposed to
be present in the the list multiple times as multiple elements
of the list.  It simplifies checking whether a discount's conditions
are satisfied.