def extract_density(population, plane='<STR_LIT>', bins=<NUM_LIT:100>, neurite_type=NeuriteType.basal_dendrite):
segment_midpoints = get_feat('<STR_LIT>', population, neurite_type=neurite_type)<EOL>horiz = segment_midpoints[:, '<STR_LIT>'.index(plane[<NUM_LIT:0>])]<EOL>vert = segment_midpoints[:, '<STR_LIT>'.index(plane[<NUM_LIT:1>])]<EOL>return np.histogram2d(np.array(horiz), np.array(vert), bins=(bins, bins))<EOL>
Extracts the 2d histogram of the center
       coordinates of segments in the selected plane.