def section_path_lengths(neurites, neurite_type=NeuriteType.all):
<EOL>dist = {}<EOL>neurite_filter = is_type(neurite_type)<EOL>for s in iter_sections(neurites, neurite_filter=neurite_filter):<EOL><INDENT>dist[s] = s.length<EOL><DEDENT>def pl2(node):<EOL><INDENT>'''<STR_LIT>'''<EOL>return sum(dist[n] for n in node.iupstream())<EOL><DEDENT>return map_sections(pl2, neurites, neurite_type=neurite_type)<EOL>
Path lengths of a collection of neurites