'Returns file_format representation for given queryset.'

def get_export_data(self, file_format, queryset, *args, **kwargs):

    request = kwargs.pop('request')
    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
