def compress_txn_outputs(txn_outputs):
    result_dict = {}
    for txn_output in txn_outputs:
        if txn_output['address'] in result_dict:
            result_dict[txn_output['address']] += txn_output['value']
        else:
            result_dict[txn_output['address']] = txn_output['value']
    return result_dict
Take a list of txn ouputs (from get_txn_outputs output of pybitcointools)
dataset/ETHPy150Open blockcypher/blockcypher-python/blockcypher/utils.py/compress_txn_outputs