docs: def add_item(session, item, quantity=1):
          """
          :param item: a ShoppingCartItem namedtuple
          """
          shopping_cart = session.get_attribute('shopping_cart')
          if shopping_cart:
              shopping_cart.add_item(item, quantity)
          else:
              shopping_cart = ShoppingCart()
              shopping_cart.add_item(item, quantity)
          session.set_attribute('shopping_cart', shopping_cart)