code: def destroy(self, request, variant_id=None):
          
          variant = ProductVariant.objects.get(id=variant_id)
          quantity = int(request.data.get("quantity", 1))
          try:
              item = BasketItem.objects.get(
                  basket_id=utils.basket_id(request), variant=variant)
              item.decrease_quantity(quantity)
          except BasketItem.DoesNotExist:
              pass
  
          serializer = BasketItemSerializer(self.get_queryset(request), many=True)
          return Response(data=serializer.data,
                          status=status.HTTP_200_OK)
docs: Remove an item from the basket