'Given a block_dict with no assets (as returned from a database call)
and a list of assets, reconstruct the original block by putting the
assets back into the ``CREATE`` transactions in the block.
Args:
block_dict (:obj:`dict`): The block dict as returned from a
database call.
assets (:obj:`list` of :obj:`dict`): A list of assets returned from
a database call.
Returns:
dict: The dict of the reconstructed block.'

@staticmethod
def couple_assets(block_dict, assets):

    assets = {asset.pop('id'): asset for asset in assets}
    for transaction in block_dict['block']['transactions']:
        if (transaction['operation'] in [Transaction.CREATE, Transaction.GENESIS]):
            transaction.update({'asset': assets.get(transaction['id'])})
    return block_dict
