Simple godot import variable?

I would love some help to understand. I have a script globals.gd:

var test = 7

I want to import that and print that in importer.gd:

@tool
extends EditorScript

func _run():
	var script = load("res://globals.gd")
	print(script.test)

When executed importer.gd I get

 res://importer.gd:32 - Invalid get index 'test' (on base: 'GDScript').

You loaded the resource (the GDScript class) you need to create a instance of that class with new()

func _run():
	var script = load("res://globals.gd").new()
	print(script.test)