docs: def layout_deck(self, i):
          """Stack the cards, starting at my deck's foundation, and proceeding
          by ``card_pos_hint``
  
          """
          def get_dragidx(cards):
              j = 0
              for card in cards:
                  if card.dragging:
                      return j
                  j += 1
          # Put a None in the card list in place of the card you're
          # hovering over, if you're dragging another card. This will
          # result in an empty space where the card will go if you drop
          # it now.
          cards = list(self.decks[i])
          dragidx = get_dragidx(cards)
          if dragidx is not None:
              del cards[dragidx]
          if self.insertion_deck == i and self.insertion_card is not None:
              insdx = self.insertion_card
              if dragidx is not None and insdx > dragidx:
                  insdx -= 1
              cards.insert(insdx, None)
          if self.direction == 'descending':
              cards.reverse()
          # Work out the initial pos_hint for this deck
          (phx, phy) = get_pos_hint(self.starting_pos_hint, *self.card_size_hint)
          phx += self.deck_x_hint_step * i + self.deck_x_hint_offsets[i]
          phy += self.deck_y_hint_step * i + self.deck_y_hint_offsets[i]
          (w, h) = self.size
          (x, y) = self.pos
          # start assigning pos and size to cards
          found = self._get_foundation(i)
          if found in self.children:
              self.remove_widget(found)
          self.add_widget(found)
          for card in cards:
              if card is not None:
                  if card in self.children:
                      self.remove_widget(card)
                  (shw, shh) = self.card_size_hint
                  card.pos = (
                      x + phx * w,
                      y + phy * h
                  )
                  card.size = (w * shw, h * shh)
                  self.add_widget(card)
              phx += self.card_x_hint_step
              phy += self.card_y_hint_step