<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_queryset(self, value, queryset):
 """ Filter the queryset to all instances matching the given attribute. """

        filter_kwargs = {self.field_name: value}
        return queryset.filter(**filter_kwargs)