Once you use a seed, ideally you should never need it again. The exception is if you need to put it in a different wallet, or your wallet becomes corrupted and there is no backup, or something similar. This is because everything you may need is stored in your wallet: the DID, the verkey, and the private key. When you later return and want to use these keys, you tell libindy which DID you want to use, and it signs using the corresponding private key that it gets from the wallet. So the DID is what you need to remember. In this example, a credential definition is being written to the ledger, after a pool and wallet have been opened, and a DID which is already in the wallet is specified.
result = await ledger.sign_and_submit_request(pool_handle, wallet_handle, did, cred_def_request)