Node priority & node muting

Hello! Is it possible to prioritize connected nodes and mute nodes when a signal comes from a priority node?

I don’t know of a way to do that. Maybe someone has a script for that… anyone?