Where and how are TIME and time_scale defined?
I found the following by entering "TIME" and "time_scale" into the search box of the Godot docs.
Built-in
Description
in float TIME
Global time since the engine has started, in seconds (always positive). It's subject to the rollover setting (which is 3,600 seconds by default). It's not affected by time_scale or pausing, but you can override the TIME variable's time scale by calling VisualServer.set_shader_time_scale() with the desired time scale factor as parameter (1.0 being the default).