code: func (intr *Interpreter) Thread(ctx context.Context) *starlark.Thread {
  	th := &starlark.Thread{
  		Print: func(th *starlark.Thread, msg string) {
  			position := th.Caller().Position()
  			if intr.Logger != nil {
  				intr.Logger(position.Filename(), int(position.Line), msg)
  			} else {
  				fmt.Fprintf(os.Stderr, "[%s:%d] %s\n", position.Filename(), position.Line, msg)
  			}
  		},
  	}
  	th.SetLocal(threadCtxKey, ctx)
  	th.SetLocal(threadIntrKey, intr)
  	th.SetLocal(threadKindKey, ThreadUnknown)
  	if intr.ThreadModifier != nil {
  		intr.ThreadModifier(th)
  	}
  	return th
  }
docs: // Thread creates a new Starlark thread associated with the given context.
  //
  // Thread() can be used, for example, to invoke callbacks registered by the
  // loaded Starlark code.
  //
  // The context ends up available to builtins through Context(...).
  //
  // The returned thread has no implementation of load(...) or exec(...). Use
  // LoadModule or ExecModule to load top-level Starlark code instead. Note that
  // load(...) statements are forbidden inside Starlark functions anyway.