code: def get_queryset(self):
          
          if self.relation_names is None:
              raise ImproperlyConfigured(
                  "'%s' must define 'relation_names'" %
                  self.__class__.__name__)
          if not isinstance(self.relation_names, (tuple, list)):
              raise ImproperlyConfigured(
                  "%s's relation_names property must be a tuple or list." %
                  self.__class__.__name__)
          return super(PrefetchRelatedMixin, self
                       ).get_queryset().prefetch_related(*self.relation_names)
docs: Check if relation_names is correctly set and
          do a prefetch related on the queryset with it.