code: def cart_modify(self, items, CartId=None, HMAC=None, **kwargs):
          
          if not CartId or not HMAC:
              raise CartException('CartId required for CartModify call')
  
          if isinstance(items, dict):
              items = [items]
  
          if len(items) > 10:
              raise CartException("You can't add more than 10 items at once")
  
          cart_item_id_key_template = 'Item.{0}.CartItemId'
          quantity_key_template = 'Item.{0}.Quantity'
  
          for i, item in enumerate(items):
              kwargs[cart_item_id_key_template.format(i)] = item['cart_item_id']
              kwargs[quantity_key_template.format(i)] = item['quantity']
  
          response = self.api.CartModify(CartId=CartId, HMAC=HMAC, **kwargs)
          root = objectify.fromstring(response)
  
          new_cart = AmazonCart(root)
          self._check_for_cart_error(new_cart)
  
          return new_cart
docs: CartAdd.
          :param items:
              A dictionary containing the items to be added to the cart.
              Or a list containing these dictionaries.
              example: [{'cart_item_id': 'rt2ofih3f389nwiuhf8934z87o3f4h',
              'quantity': 1}]
          :param CartId: Id of Cart
          :param HMAC: HMAC of Cart, see CartCreate for more info
          :return:
              An :class:`~.AmazonCart`.