code: def getOwnerKeyForAccount(self, name):
          
          account = self.rpc.get_account(name)
          for authority in account["owner"]["key_auths"]:
              key = self.getPrivateKeyForPublicKey(authority[0])
              if key:
                  return key
          raise KeyNotFound
docs: Obtain owner Private Key for an account from the wallet database