<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def total_items(self, request):

 """
 Get total number of items in the basket
 """

        n_total = 0
        for item in self.get_queryset(request):
            n_total += item.quantity

        return Response(data={"quantity": n_total}, status=status.HTTP_200_OK)