def get_stream(self, stream):
        """
        Helper for paginating streams and serializing responses
        """
        page = self.paginate_queryset(stream)
        if page is not None:
            serializer = self.get_serializer(page, many=True)
            return self.get_paginated_response(serializer.data)
        serializer = self.get_serializer(stream, many=True)
        return Response(serializer.data)

        Helper for paginating streams and serializing responses
        
actstream/drf/views.py