The script is a node, it extends the node it's connected to, in that sense it is part of the node it's attached to.
To phrase it differently, when you attach a script to a node you are creating a new node that extends the node(class) you attached the script to.