def concatenate_raws(raws, preload=None, events_list=None):
 if (events_list is not None):
  if (len(events_list) != len(raws)):
   raise ValueError('`raws` and `event_list` are required to be of the same length')
  (first, last) = zip(*[(r.first_samp, r.last_samp) for r in raws])
  events = concatenate_events(events_list, first, last)
 raws[0].append(raws[1:], preload)
 if (events_list is None):
  return raws[0]
 else:
  return (raws[0], events)

def concatenate_raws ( raws , preload = None , events_list = None ) : if ( events_list is not None ) : if ( len ( events_list ) != len ( raws ) ) : raise ValueError ( '`raws` and `event_list` are required to be of the same length' ) ( first , last ) = zip ( * [ ( r . first_samp , r . last_samp ) for r in raws ] ) events = concatenate_events ( events_list , first , last ) raws [ 0 ] . append ( raws [ 1 : ] , preload ) if ( events_list is None ) : return raws [ 0 ] else : return ( raws [ 0 ] , events )
concatenate raw instances as if they were continuous .