def get_paginated_response(self, data):
        kwargs = self.request.parser_context['kwargs'].copy()
        embedded = kwargs.pop('is_embedded', None)
        view_name = self.request.parser_context['view'].view_fqn
        reversed_url = None
        if embedded:
            reversed_url = reverse(view_name, kwargs=kwargs)

        response_dict = self.get_response_dict(data, reversed_url)

        if is_anonymized(self.request):
            if response_dict.get('meta', False):
                response_dict['meta'].update({'anonymous': True})
            else:
                response_dict['meta'] = {'anonymous': True}
        return Response(response_dict)
Formats paginated response in accordance with JSON API.
dataset/ETHPy150Open CenterForOpenScience/osf.io/api/base/pagination.py/JSONAPIPagination.get_paginated_response