Another option is something I learned at work and I find it pretty cool!
On ready you can have something like this:
func _ready():
   set_process_unhandled_input(false)
   if get_tree().current_scene == self:
      set_process_unhandled_input(true)
This way you can leave the _unhandled_input there for testing purposes whenever you press F6 to run only that scene, and it will not affect the rest of the game.
It's very usefull to test UI that needs to be populated, as I can populate it with whatever I need for testing purposes!