docs: def card_bundle_parser(bundle: CardBundle, debug=False) -> Iterator:
      '''this function wraps all the card transfer parsing'''
  
      try:
          # first vout of the bundle must pay to deck.p2th
          validate_card_transfer_p2th(bundle.deck, bundle.vouts[0])
  
          # second vout must be OP_RETURN with card_metainfo
          card_metainfo = parse_card_transfer_metainfo(
                              read_tx_opreturn(bundle.vouts[1]),
                              bundle.deck.version
                              )
  
      # if any of this exceptions is raised, return None
      except (InvalidCardTransferP2TH,
              CardVersionMismatch,
              CardNumberOfDecimalsMismatch,
              RecieverAmountMismatch,
              DecodeError,
              TypeError,
              InvalidNulldataOutput) as e:
  
          if debug:
              print(e)  # re-do as logging later on
          return
          yield
  
      # check for decimals
      if not card_metainfo["number_of_decimals"] == bundle.deck.number_of_decimals:
          raise CardNumberOfDecimalsMismatch(
                  {"error": "Number of decimals does not match."}
                  )
  
      # deduce the individual cards in the bundle
      cards = card_postprocess(card_metainfo, bundle.vouts)
  
      #  drop the vouts property
      del bundle.__dict__['vouts']
  
      for c in cards:
          d = {**c, **bundle.__dict__}
  
          try:
              yield CardTransfer(**d)
  
          # issuing cards to issuing address is forbidden,
          # this will except the error
          except InvalidCardIssue as e:
  
              if debug:
                  print(e)