Wall between rooms

Hi Guys,

I am new to dynamo i am looking to change parameter to walls based on their adjacency to certain rooms. I can’t seem to figure out how to develop a boolean parameter that establishes a relationship between the walls and the rooms. For example Room A is adjacent to Room B so any wall that touches both room boundaries is selected.

Thanks.