<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def CreateKey(self, prikey=None):
 """ Create a KeyPair and store it encrypted in the database. Args: private_key (iterable_of_ints):
 (optional) 32 byte private key. Returns: KeyPair: a KeyPair instance. """

        account = super(UserWallet, self).CreateKey(private_key=prikey)
        self.OnCreateAccount(account)
        contract = WalletContract.CreateSignatureContract(account.PublicKey)
        self.AddContract(contract)
        return account