Generate a :class:`Transaction
        <stellar_base.transaction.Transaction>` object from the list of
        operations contained within this object.

        :return: A transaction representing all of the operations that have
            been appended to this builder.
        :rtype: :class:`Transaction <stellar_base.transaction.Transaction>`

def gen_tx(self):
        """Generate a :class:`Transaction
        <stellar_base.transaction.Transaction>` object from the list of
        operations contained within this object.

        :return: A transaction representing all of the operations that have
            been appended to this builder.
        :rtype: :class:`Transaction <stellar_base.transaction.Transaction>`

        """
        if not self.address:
            raise StellarAddressInvalidError('Transaction does not have any source address.')
        if self.sequence is None:
            raise SequenceError('No sequence is present, maybe not funded?')
        tx = Transaction(
            source=self.address,
            sequence=self.sequence,
            time_bounds=self.time_bounds,
            memo=self.memo,
            fee=self.fee * len(self.ops),
            operations=self.ops)
        self.tx = tx
        return tx