neurom.view.view.map_segments

neurom.view.view.map_segments(neurite, fun)

map a function to the segments in a tree