function getGlobalScope() {
  if (!globalScope) {
    globalScope = new Scope();
  }

  return globalScope;
}
This is mainly needed for tests.
DO NOT USE this, as this is an internal API and subject to change.
@hidden