<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_filter(self, package_filter):
 """Add a filter to the list. Args: package_filter (`PackageFilter`):
 Filter to add. """

        filters = self.filters + [package_filter]
        self.filters = sorted(filters, key=lambda x: x.cost)