a gdscript class
you can store a class in an own gd-file. You dont need to connect it to a node or something. You dont need to extent something like "Extends node".
for example you store this class in the gd-file testclass.gd in a script folder "res://scripts/testclass.gd":
class_name testclass
func _init(arg): #you need an _init-method if you want to init something
print("init class with arg "+arg)
func classmethod():
print("i am the method and do classthings")
return "test of a class"
and in your gdscript for example your mainscript thats attached to a node you call the class (here only the lines for the class):
var tc = preload("res://scripts/testclass.gd")
var testc=testclass.new("1")
func _ready(): #for example in _ready
print(testc.classmethod())
but without the "5."