def _group_process(template_group, parallel, debug, cores, stream, daylong,<EOL>ignore_length, overlap):
master = template_group[<NUM_LIT:0>]<EOL>processed_streams = []<EOL>kwargs = {<EOL>'<STR_LIT>': master.filt_order,<EOL>'<STR_LIT>': master.highcut, '<STR_LIT>': master.lowcut,<EOL>'<STR_LIT>': master.samp_rate, '<STR_LIT>': debug,<EOL>'<STR_LIT>': parallel, '<STR_LIT>': cores}<EOL>if daylong:<EOL><INDENT>if not master.process_length == <NUM_LIT>:<EOL><INDENT>warnings.warn(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % master.process_length)<EOL><DEDENT>func = dayproc<EOL>kwargs.update({'<STR_LIT>': ignore_length})<EOL>starttimes = [tr.stats.starttime.date for tr in stream]<EOL>if not len(list(set(starttimes))) == <NUM_LIT:1>:<EOL><INDENT>warnings.warn('<STR_LIT>')<EOL>starttime = UTCDateTime(<EOL>stream.sort(['<STR_LIT>'])[-<NUM_LIT:1>].stats.starttime.date)<EOL><DEDENT>else:<EOL><INDENT>starttime = stream.sort(['<STR_LIT>'])[<NUM_LIT:0>].stats.starttime<EOL><DEDENT><DEDENT>else:<EOL><INDENT>func = shortproc<EOL>starttime = stream.sort(['<STR_LIT>'])[<NUM_LIT:0>].stats.starttime<EOL><DEDENT>endtime = stream.sort(['<STR_LIT>'])[-<NUM_LIT:1>].stats.endtime<EOL>data_len_samps = round((endtime - starttime) * master.samp_rate) + <NUM_LIT:1><EOL>chunk_len_samps = (master.process_length - overlap) * master.samp_rate<EOL>n_chunks = int(data_len_samps / chunk_len_samps)<EOL>if n_chunks == <NUM_LIT:0>:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>for i in range(n_chunks):<EOL><INDENT>kwargs.update(<EOL>{'<STR_LIT>': starttime + (i * (master.process_length - overlap))})<EOL>if not daylong:<EOL><INDENT>kwargs.update(<EOL>{'<STR_LIT>': kwargs['<STR_LIT>'] + master.process_length})<EOL>chunk_stream = stream.slice(starttime=kwargs['<STR_LIT>'],<EOL>endtime=kwargs['<STR_LIT>']).copy()<EOL><DEDENT>else:<EOL><INDENT>chunk_stream = stream.copy()<EOL><DEDENT>for tr in chunk_stream:<EOL><INDENT>tr.data = tr.data[<NUM_LIT:0>:int(<EOL>master.process_length * tr.stats.sampling_rate)]<EOL><DEDENT>processed_streams.append(func(st=chunk_stream, **kwargs))<EOL><DEDENT>return processed_streams<EOL>
Process data into chunks based on template processing length.

Templates in template_group must all have the same processing parameters.

:type template_group: list
:param template_group: List of Templates.
:type parallel: bool
:param parallel: Whether to use parallel processing or not
:type debug: int
:param debug: Debug level from 0-5
:type cores: int
:param cores: Number of cores to use, can be False to use all available.
:type stream: :class:`obspy.core.stream.Stream`
:param stream: Stream to process, will be left intact.
:type daylong: bool
:param daylong: Whether to enforce day-length files or not.
:type ignore_length: bool
:param ignore_length:
    If using daylong=True, then dayproc will try check that the data
    are there for at least 80% of the day, if you don't want this check
    (which will raise an error if too much data are missing) then set
    ignore_length=True.  This is not recommended!
:type overlap: float
:param overlap: Number of seconds to overlap chunks by.

:return: list of processed streams.