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: context_done_example_test.go
    path of file: ./repos/wazero
    
    the code of the file until where you have to start completion: package wazero_test

import (
	"context"
	_ "embed"
	"fmt"
	"log"
    
func ExampleRuntimeConfig_WithCloseOnContextDone_moduleClose() {
	ctx := context.Background()

	r := wazero.NewRuntimeWithConfig(ctx,
		// Enables the WithCloseOnContextDone option.
		wazero.NewRuntimeConfig().WithCloseOnContextDone(true))
	defer r.Close(ctx)

	moduleInstance, err := r.InstantiateWithConfig(ctx, infiniteLoopWasm,
		wazero.NewModuleConfig().WithName("malicious_wasm"))
	if err != nil {
		log.Panicln(err)
	}

	infiniteLoop := moduleInstance.ExportedFunction("infinite_loop")

	go func() {
		// After 2 seconds, close the module instance with CloseWithExitCode, which triggers the termination
		// of infinite loop.
		time.Sleep(2 * time.Second)
		if err := moduleInstance.CloseWithExitCode(ctx, 1); err != nil {
			log.Panicln(err)
		}
	}()

	// Invoke the infinite loop with the timeout context.
	_, err = infiniteLoop.Call(ctx)

	// The exit code is correctly handled and triggers the termination of infinite loop.
	fmt.Println(err)

	// Output:
	//	module closed with exit_code(1)
}