[Help] Create a Pipe Network With Plumbing Fixture

Hi :),

I’m trying to create a script that creates the network if pipes and plumbing fixtures, but I had many problems, for example, I tried to use the “pipe upstream components” and “elements in connected network”, they not show me the right network way or not show the plumbing fixture.
Does someone know how I can create or have some advice to create the script as I said?
The picture below illustrates the idea with two plumbing fixtures.