docs: def _section_end_points(structure_block, id_map):
      '''Get the section end-points'''
      soma_idx = structure_block[:, TYPE] == POINT_TYPE.SOMA
      soma_ids = structure_block[soma_idx, ID]
      neurite_idx = structure_block[:, TYPE] != POINT_TYPE.SOMA
      neurite_rows = structure_block[neurite_idx, :]
      soma_end_pts = set(id_map[id_]
                         for id_ in soma_ids[np.in1d(soma_ids, neurite_rows[:, PID])])
  
      # end points have either no children or more than one
      # ie: leaf or multifurcation nodes
      n_children = defaultdict(int)
      for row in structure_block:
          n_children[row[PID]] += 1
      end_pts = set(i for i, row in enumerate(structure_block)
                    if n_children[row[ID]] != 1)
  
      return end_pts.union(soma_end_pts)