Connected pipe network between two revit elements

can anybody help me to modify elements in connected network from mepover package to find connected elements between two inputs.basically what i need is when i input one pipe element (first pipe in connected network) and one plumbing fixture(one terminal element in water piping network) node should give me the elements included between them…thanks…I have attached a python script with node mention above from mepover package.
connected elements in network2020.dyn (2.7 KB)