def METHOD_NAME(self, wallet_basename, encrypt=False):
    self.nodes[0].createwallet(wallet_name=f"{wallet_basename}_base", descriptors=False, blank=True)
    self.nodes[0].createwallet(wallet_name=f"{wallet_basename}_test", descriptors=False, blank=True)
    base_wallet = self.nodes[0].get_wallet_rpc(f"{wallet_basename}_base")
    test_wallet = self.nodes[0].get_wallet_rpc(f"{wallet_basename}_test")
    # Setup both wallets with the same HD seed
    seed = get_generate_key()
    base_wallet.sethdseed(True, seed.privkey)
    test_wallet.sethdseed(True, seed.privkey)
    if encrypt:
        # Encrypting will generate a new HD seed and flush the keypool
        test_wallet.encryptwallet("pass")
    else:
        # Generate a new HD seed on the test wallet
        test_wallet.sethdseed()
    return base_wallet, test_wallet