You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: basic.rs
    path of file: ./repos/rivet/svc/api/kv/tests
    
    the code of the file until where you have to start completion: use proto::backend::{self, pkg::*};
use rivet_operation::prelude::*;
use serde_json::{json, Value};
use std::{collections::HashMap, str::FromStr, sync::Once, time::Duration};

use rivet_api::{
	apis::{configuration::Configuration, *},
	models,
};

const LOBBY_GROUP_NAME_ID: &str = "test";

static GLOBAL_INIT: Once = Once::new();

struct Ctx {
	op_ctx: OperationContext<()>,
	game_id: Uuid,
	primary_region_id: Uuid,
	namespace_id: Uuid,
	mm_config_meta: backend::matchmaker::VersionConfigMet
    
async fn list() {
	let ctx = Ctx::init().await;
	let cloud_token = ctx.issue_cloud_token().await;

	let values = (0..12).map(|i| json!({ "idx": i })).collect::<Vec<_>>();

	// Write data
	for (i, value) in values.iter().enumerate() {
		kv_api::kv_put(
			&ctx.config(&cloud_token),
			models::KvPutRequest {
				key: format!("root-{i}"),
				value: Some(value.clone()),
				namespace_id: Some(ctx.namespace_id),
			},
		)
		.await
		.unwrap();

		kv_api::kv_put(
			&ctx.config(&cloud_token),
			models::KvPutRequest {
				key: format!("value/idx-{i}"),
				value: Some(value.clone()),
				namespace_id: Some(ctx.namespace_id),
			},
		)
		.await
		.unwrap();
	}

	// kv-list is not consistent for performance
	tokio::time::sleep(Duration::from_secs(2)).await;

	// List root
	let res = kv_api::kv_list(&ctx.config(&cloud_token), "", &ctx.namespace_id.to_string())
		.await
		.unwrap();

	assert_eq!(
		values.len(),
		res.entries.len(),
		"wrong value count returned"
	);

	// List subdir
	let res = kv_api::kv_list(
		&ctx.config(&cloud_token),
		"value",
		&ctx.namespace_id.to_string(),
	)
	.await
	.unwrap();

	assert_eq!(
		values.len(),
		res.entries.len(),
		"wrong value count returned"
	);
}