I'm working on some validation code. I want to look for all the valves in a design, then determine what pipes they are connected to, and compare their diameters. Seems straightforward and deterministic. I have figured out how to loop through a design…