<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def construct(self, method, name, lowcut, highcut, samp_rate, filt_order, prepick, **kwargs):
 """ Construct a template using a given method. :param method: Method to make the template, see :mod:`eqcorrscan.core.template_gen` for possible methods. :type method: str :type name: str :param name: Name for the template :type lowcut: float :param lowcut: Low cut (Hz), if set to None will not apply a lowcut :type highcut: float :param highcut: High cut (Hz), if set to None will not apply a highcut. :type samp_rate: float :param samp_rate: New sampling rate in Hz. :type filt_order: int :param filt_order: Filter level (number of corners). :type prepick: float :param prepick: Pre-pick time in seconds .. Note:: methods `from_meta_file`, `from_seishub`, `from_client` and `multi_template_gen` are not accommodated in this function and must be called from Tribe.construct as these generate multiple templates. .. Note:: Calls functions from `eqcorrscan.core.template_gen`, see these functions for details on what further arguments are required. .. rubric:: Example Template test: 12 channels; lowcut: 2.0 Hz; highcut: 8.0 Hz; sampling rate 20.0 Hz; filter order: 4; process length: 300.0 s This will raise an error if the method is unsupported: Traceback (most recent call last):
 NotImplementedError: Method is not supported, use \ Tribe.construct instead. """

        if method in ['from_meta_file', 'from_seishub', 'from_client',
                      'multi_template_gen']:
            raise NotImplementedError('Method is not supported, '
                                      'use Tribe.construct instead.')
        streams, events, process_lengths = template_gen.template_gen(
            method=method, lowcut=lowcut, highcut=highcut,
            filt_order=filt_order, samp_rate=samp_rate, prepick=prepick,
            return_event=True, **kwargs)
        self.name = name
        st = streams[0]
        event = events[0]
        process_length = process_lengths[0]
        for tr in st:
            if not np.any(tr.data.astype(np.float16)):
                warnings.warn('Data are zero in float16, missing data,'
                              ' will not use: %s' % tr.id)
                st.remove(tr)
        self.st = st
        self.lowcut = lowcut
        self.highcut = highcut
        self.filt_order = filt_order
        self.samp_rate = samp_rate
        self.process_length = process_length
        self.prepick = prepick
        self.event = event
        return self