'Transform a Python dictionary to a Block object.
Args:
block_body (dict): A block dictionary to be transformed.
tx_construct (functions): Function to instantiate Transaction instance
Returns:
:class:`~Block`
Raises:
InvalidHash: If the block\'s id is not corresponding to its
data.'

@classmethod
def from_dict(cls, block_body, tx_construct=Transaction.from_dict):

    block = block_body['block']
    block_serialized = serialize(block)
    block_id = hash_data(block_serialized)
    if (block_id != block_body['id']):
        raise InvalidHash()
    transactions = [tx_construct(tx) for tx in block['transactions']]
    signature = block_body.get('signature')
    return cls(transactions, block['node_pubkey'], block['timestamp'], block['voters'], signature)
