code: def sign_transaction(self, signer: Account):
          
          tx_hash = self.hash256()
          sig_data = signer.generate_signature(tx_hash)
          sig = [Sig([signer.get_public_key_bytes()], 1, [sig_data])]
          self.sig_list = sig
docs: This interface is used to sign the transaction.
  
          :param signer: an Account object which will sign the transaction.
          :return: a Transaction object which has been signed.