code: func (intr *Interpreter) LoadSource(th *starlark.Thread, ref string) (string, error) {
  	if kind := GetThreadKind(th); kind != ThreadLoading && kind != ThreadExecing {
  		return "", errors.New("wrong kind of thread (not enough information to " +
  			"resolve the file reference), only threads that do 'load' and 'exec' can call this function")
  	}
  
  	target, err := makeModuleKey(ref, th)
  	if err != nil {
  		return "", err
  	}
  
  	dict, src, err := intr.invokeLoader(target)
  	if err == nil && dict != nil {
  		err = fmt.Errorf("it is a native Go module")
  	}
  	if err != nil {
  		// Avoid term "module" since LoadSource is often used to load non-star
  		// files.
  		if err == ErrNoModule {
  			err = fmt.Errorf("no such file")
  		}
  		return "", fmt.Errorf("cannot load %s: %s", target, err)
  	}
  	return src, nil
  }
docs: // LoadSource returns a body of a file inside a package.
  //
  // It doesn't have to be a Starlark file, can be any text file as long as
  // the corresponding package Loader can find it.
  //
  // 'ref' is either an absolute reference to the file, in the same format as
  // accepted by 'load' and 'exec' (i.e. "[@pkg]//path"), or a path relative to
  // the currently executing module (i.e. just "path").
  //
  // Only Starlark threads started via LoadModule or ExecModule can be used with
  // this function. Other threads don't have enough context to resolve paths
  // correctly.