code: def add(self, pk, quantity=1, **kwargs):
          
          pk = str(pk)
          if pk in self.items:
              existing_item = self.items[pk]
              existing_item.quantity += _clean_quantity(quantity)
          else:
              queryset = self.get_queryset([pk])
              try:
                  obj = queryset[0]
              except IndexError:
                  raise ItemNotInDatabase(pk=pk)
              obj = self.process_object(obj)
              self.items[pk] = self.item_class(obj, quantity, **kwargs)
          self.update()
docs: Add an item to the cart.
  
          If the item is already in the cart, then its quantity will be
          increased by `quantity` units.
  
          Parameters
          ----------
          pk : str or int
              The primary key of the item.
          quantity : int-convertible
              A number of units of to add.
          **kwargs
              Extra keyword arguments to pass to the item class
              constructor.
  
          Raises
          ------
          ItemNotInDatabase
          NegativeItemQuantity
          NonConvertibleItemQuantity
          TooLargeItemQuantity
          ZeroItemQuantity