<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def n_leaves(neurites, neurite_type=NeuriteType.all):
    '''number of leaves points in a collection of neurites'''
    return n_sections(neurites, neurite_type=neurite_type, iterator_type=Tree.ileaf)