def _write_bdf_dict_cards(bdf_file, cards, size, is_double, is_long_ids):
    """writes a dictionary"""
    if bdf_file is None:
        return
    if is_long_ids:
        for card in cards:
            bdf_file.write(card.write_card_16(is_double))
    else:
        for card in cards:
            bdf_file.write(card.write_card(size, is_double))
