def METHOD_NAME(self, request, *args, **kwargs):
    queryset = self.filter_queryset(self.get_queryset())
    page = self.paginate_queryset(queryset)
    if page is not None:
        serializer = self.get_serializer(page, many=True)
        return self.get_paginated_response(self.attach_metadata(serializer.data))
    serializer = self.get_serializer(queryset, many=True)
    return Response(self.attach_metadata(serializer.data))