To expand on Gluon's excellent answer, the best way to handle code (whether it's in a game or anything else) is to divide it up into chunks of discrete responsibility where each component handles one thing.
Your image didn't work so I can't see your example but let's say you have a player character scene which consists of a node for each body part and an animation tree.
Well, say you want to implement animations and begin with gripping. There's more than one way to skin a cat.
You could put all the animation code in AnimationTree and use it like an api, calling
$AnimationTree.toggle_grip() from the player root node where you have the user controls/AI. Now, all your player animations are in one place, easy to manage and expand.
Another option is to throw everything in the player's base node. So now, instead of just calling
$AnimationTree.toggle_grip()you need a
toggle_grip() method in the player root node which reaches across to $AnimationTree and makes the changes.
Equally, you could put everything relating to the hand in your hand node. Well, the animation code would be spread widely and your code might be less manageable.
The answer is to stop and think about how easy it would be, with each option, to come back in six months when your forgotten the code and quickly add another 10 animations. There's no right or wrong answer just general guidelines for good coding structure.
In this case, I would likely put the animation tree code in the AnimationTree node but you might have a good reason for doing it differently.