code: def unlist_streamlines(streamlines):
      """Return the streamlines not as a list but as an array and an offset
  
      Parameters
      ----------
      streamlines: sequence
  
      Returns
      -------
      points : array
      offsets : array
  
      """
  
      points = np.concatenate(streamlines, axis=0)
      offsets = np.zeros(len(streamlines), dtype="i8")
  
      curr_pos = 0
      for i, s in enumerate(streamlines):
          prev_pos = curr_pos
          curr_pos += s.shape[0]
          points[prev_pos:curr_pos] = s
          offsets[i] = curr_pos
  
      return points, offsets
  
imports: from copy import deepcopy
  from warnings import warn
  import types
  from scipy.spatial.distance import cdist
  import numpy
  from nibabel.affines import apply_affine
  from nibabel.streamlines import ArraySequence
  from dipy.tracking.streamlinespeed import length, set_number_of_points
  from dipy.tracking.distances import bundles_distances_mdf
  import dipy.tracking.utils
  from dipy.core.geometry import dist_to_corner
  from dipy.core.interpolation import interpolate_vector_3d, interpolate_scalar_3d
label_desc: Use image node_id 1 for calling a global function with example usage: unlist_streamlines(streamlines) and returns: points,  offsets