code: def get_export_data(self, file_format, queryset, *args, **kwargs):
          
          request = kwargs.pop("request")
          if not self.has_export_permission(request):
              raise PermissionDenied
  
          resource_class = self.get_export_resource_class()
          data = resource_class(**self.get_export_resource_kwargs(request)).export(queryset, *args, **kwargs)
          export_data = file_format.export_data(data)
          return export_data
docs: Returns file_format representation for given queryset.