code: def getComponentList(self):
          '''
          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.
          '''
  
          component_list = []
  
          for x in self.discountcombocomponent_set.all():
              for y in range(0,x.quantity):
                  component_list += [x]
  
          component_list.sort(key=lambda x: x.quantity, reverse=True)
          return component_lisf getComponentList(self):
          '''
          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.
          '''
  
          component_list = []
  
          for x in self.discountcombocomponent_set.all():
              for y in range(0,x.quantity):
                  component_list += [x]
  
          component_list.sort(key=lambda x: x.quantity, reverse=True)
          return component_list
docs: 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.