Making variables in collapsed nodes

Hello. I often use Collapse Node and i have a problem: i need some variables only in the collapsed nodes but i can’t create kinda local variables like in macros and funcs. They make garbage in my general variables and disturb. Can i save them only inside collapsed nodes and call like regular local ones?