code: def gen_te(self):
          
          if self.tx is None:
              self.gen_tx()
          te = Te(self.tx, network_id=self.network)
          if self.te:
              te.signatures = self.te.signatures
          self.te = te
          return te
docs: Generate a :class:`TransactionEnvelope
          <stellar_base.transaction_envelope.TransactionEnvelope>` around the
          generated Transaction via the list of operations in this instance.
  
          :return: A transaction envelope ready to send over the network.
          :rtype: :class:`TransactionEnvelope
              <stellar_base.transaction_envelope.TransactionEnvelope>`