<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_query_data(self, query_data):
 """ All items in a `querylist` must at least have `queryset` key and a `serializer_class` key. Any querylist item lacking both those keys will raise a ValidationError """

        for key in self.required_keys:
            if key not in query_data:
                raise ValidationError(
                    'All items in the {} querylist attribute should contain a '
                    '`{}` key'.format(self.__class__.__name__, key)
                )