<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_template(self, template_id):
 """Get a particular lightcurve template Parameters template_id : str id of desired template Returns ------- phase : ndarray array of phases mag : ndarray array of normalized magnitudes """

        try:
            data = np.loadtxt(self.data.extractfile(template_id + '.dat'))
        except KeyError:
            raise ValueError("invalid star id: {0}".format(template_id))
        return data[:, 0], data[:, 1]