How to seperate or group a bunch of pipes based on offset or height

sir i want to know is theirs a way to do this i alredy search the internet and no solution please help me

List.GroupByKey node

i allredy use that i,etract the elevation of the pipes for the keys but it does not work

Show what you tried so we can show you where you went wrong.