def METHOD_NAME(streamlines, n_steps=1):
    """Split streamlines into its segments.
    Parameters
    ----------
    streamlines : list of numpy.ndarray
        List of streamlines.
    Returns
    -------
    segments : numpy.ndarray (2D)
        Segments array representation with the first and last points.
    """
    vts_0_list = []
    vts_1_list = []
    for streamline in streamlines:
        streamline = _subdivide_streamline(streamline, n_steps)
        vts_0_list.append(streamline[:-1])
        vts_1_list.append(streamline[1:])
    segments = np.stack((np.vstack(vts_0_list), np.vstack(vts_1_list)), axis=0)
    return segments