'Transforms a Python dictionary to a Transaction object.
Args:
tx_body (dict): The Transaction to be transformed.
Returns:
:class:`~bigchaindb.common.transaction.Transaction`'

@classmethod
def from_dict(cls, tx):

    cls.validate_id(tx)
    inputs = [Input.from_dict(input_) for input_ in tx['inputs']]
    outputs = [Output.from_dict(output) for output in tx['outputs']]
    return cls(tx['operation'], tx['asset'], inputs, outputs, tx['metadata'], tx['version'])
