code: func GetThreadKind(th *starlark.Thread) ThreadKind {
  	if k := th.Local(threadKindKey); k != nil {
  		return k.(ThreadKind)
  	}
  	panic("not an Interpreter thread, no ThreadKind in its locals")
  }
docs: // GetThreadKind tells what sort of thread 'th' is: it is either inside some
  // load(...), some exec(...) or some custom call (probably a callback called
  // from native code).
  //
  // Panics if the Starlark thread wasn't created through Interpreter.Thread().