def omit_deferred_transactions(it):
    """Filter iterator to omit transactions with type `TYPE_DEFERRED_CARD`.

    This helper should typically be used when a banking site returns card and non-card
    transactions mixed on the same checking account.
    """
    for tr in it:
        if tr.type != tr.TYPE_DEFERRED_CARD:
            yield tr
