code: def add_filter(self, package_filter):
          
          filters = self.filters + [package_filter]
          self.filters = sorted(filters, key=lambda x: x.cost)
docs: Add a filter to the list.
  
          Args:
              package_filter (`PackageFilter`): Filter to add.