code: def export_to_wif(self):
          
          # Add the network byte, creating the "extended key"
          extended_key_hex = self.private_key.get_extended_key()
          # BIP32 wallets have a trailing \01 byte
          extended_key_bytes = unhexlify(ensure_bytes(extended_key_hex)) + b'\01'
          # And return the base58-encoded result with a checksum
          return base58.b58encode_check(extended_key_bytes)
docs: Export a key to WIF.
  
          See https://en.bitcoin.it/wiki/Wallet_import_format for a full
          description.