<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mdot_t(self,ifig=None,lims=[7.4,2.6,-8.5,-4.5],label=None,colour=None,s2ms=False, dashes=None):
 """ Plot mass loss history as a function of log-time-left Parameters ifig : integer or string Figure label, if None the current figure is used The default value is None. lims : list [x_lower, x_upper, y_lower, y_upper] label : string Label for the model The default value is None colour : string The colour of the line The default value is None s2ms : boolean, optional "skip to main sequence" dashes : list, optional Custom dashing style. If None, ignore. The default is None. """


        fsize=18

        params = {'axes.labelsize':  fsize,
        #    'font.family':       'serif',
        'font.family':        'Times New Roman',
        'figure.facecolor':  'white',
        'text.fontsize':     fsize,
        'legend.fontsize':   fsize,
        'xtick.labelsize':   fsize*0.8,
        'ytick.labelsize':   fsize*0.8,
        'text.usetex':       False}

        try:
            pl.rcParams.update(params)
        except:
            pass

        if ifig is not None:
            pl.figure(ifig)

        if s2ms:
            h1=self.get('center_h1')
            idx=np.where(h1[0]-h1>=3.e-3)[0][0]
            skip=idx
        else:
            skip=0

        gage= self.get('star_age')
        lage=np.zeros(len(gage))
        agemin = max(old_div(abs(gage[-1]-gage[-2]),5.),1.e-10)
        for i in np.arange(len(gage)):
            if gage[-1]-gage[i]>agemin:
                lage[i]=np.log10(gage[-1]-gage[i]+agemin)
            else :
                lage[i]=np.log10(agemin)
        x = lage[skip:]
        y = self.get('log_abs_mdot')[skip:]

        if ifig is not None:
            pl.figure(ifig)
        if label is not None:
            if colour is not None:
                line,=pl.plot(x,y,label=label,color=colour)
            else:
                line,=pl.plot(x,y,label=label)
        else:
            if colour is not None:
                line,=pl.plot(x,y,color=colour)
            else:
                line,=pl.plot(x,y)

        if dashes is not None:
            line.set_dashes(dashes)
        if label is not None:
            pl.legend(loc='best').draw_frame(False)

        pl.xlim(lims[:2])
        pl.ylim(lims[2:])
        pl.ylabel('$\mathrm{log}_{10}(\|\dot{M}\|/M_\odot\,\mathrm{yr}^{-1})$')
        pl.xlabel('$\mathrm{log}_{10}(t^*/\mathrm{yr})$')