code: def change_quantity(self, pk, quantity):
          
          pk = str(pk)
          try:
              item = self.items[pk]
          except KeyError:
              raise ItemNotInCart(pk=pk)
          item.quantity = quantity
          self.update()
docs: Change the quantity of an item.
  
          Parameters
          ----------
          pk : str or int
              The primary key of the item.
          quantity : int-convertible
              A new quantity.
  
          Raises
          ------
          ItemNotInCart
          NegativeItemQuantity
          NonConvertibleItemQuantity
          TooLargeItemQuantity
          ZeroItemQuantity