def convert_transactions_to_blocks(E, transactions):

    verify_transaction_cases(transactions)

    balances, transfers = process_transactions(E, transactions)

    stock_blocks = []
    if transfers:
        stock_blocks.append(transfers)
    if balances:
        stock_blocks.append(balances)

    return stock_blocks
Converts a list of StockTransactions (which in xml are entity items)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/commtrack/sms.py/convert_transactions_to_blocks