func LoadAssertModule() (starlark.StringDict, error) {
	once.Do(func() {
		predeclared := starlark.StringDict{
			"error":   starlark.NewBuiltin("error", error_),
			"catch":   starlark.NewBuiltin("catch", catch),
			"matches": starlark.NewBuiltin("matches", matches),
			"module":  starlark.NewBuiltin("module", starlarkstruct.MakeModule),
			"_freeze": starlark.NewBuiltin("freeze", freeze),
		}
		thread := new(starlark.Thread)
		assert, assertErr = starlark.ExecFile(thread, "builtins/assert.star", assertStar, predeclared)
	})
	return assert, assertErr
}
LoadAssertModule loads the assert module.
It is concurrency-safe and idempotent.
package starlarktest  
import (
	"fmt"
	"os"
	"path/filepath"
	"regexp"
	"strings"
	"sync"
	"go.starlark.net/starlark"
	"go.starlark.net/starlarkstruct"
)
const localKey = "Reporter"
type Reporter interface {
	Error(args ...interface{})
}
func SetReporter(thread *starlark.Thread, r Reporter) {
	thread.SetLocal(localKey, r)
}
func GetReporter(thread *starlark.Thread) Reporter {
	r, ok := thread.Local(localKey).(Reporter)
	if !ok {
		panic("internal error: starlarktest.SetReporter was not called")
	}
	return r
}
var (
	once      sync.Once
	assert    starlark.StringDict
	assertErr error
)