def _sections_to_raw_data(sections):
soma = None<EOL>neurites = []<EOL>for section in sections:<EOL><INDENT>neurite = _extract_section(section)<EOL>if neurite is None:<EOL><INDENT>continue<EOL><DEDENT>elif neurite[<NUM_LIT:0>][COLS.TYPE] == POINT_TYPE.SOMA:<EOL><INDENT>assert soma is None, '<STR_LIT>'<EOL>soma = neurite<EOL><DEDENT>else:<EOL><INDENT>neurites.append(neurite)<EOL><DEDENT><DEDENT>assert soma is not None, '<STR_LIT>'<EOL>total_length = len(soma) + sum(len(neurite) for neurite in neurites)<EOL>ret = np.zeros((total_length, <NUM_LIT:7>,), dtype=np.float64)<EOL>pos = len(soma)<EOL>ret[<NUM_LIT:0>:pos, :] = soma<EOL>for neurite in neurites:<EOL><INDENT>end = pos + len(neurite)<EOL>ret[pos:end, :] = neurite<EOL>ret[pos:end, COLS.P] += pos<EOL>ret[pos:end, COLS.ID] += pos<EOL>ret[pos, COLS.P] = len(soma) - <NUM_LIT:1><EOL>pos = end<EOL><DEDENT>return ret<EOL>
convert list of sections into the `raw_data` format used in neurom

    This finds the soma, and attaches the neurites