<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hrd(self,ifig=None,label=None,colour=None,s2ms=False, dashes=None,**kwargs):
 """ Plot an HR diagram 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"? The default is False. 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

        x = self.get('log_Teff')[skip:]
        y = self.get('log_L')[skip:]

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

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


#        pyl.plot(self.data[:,self.cols['log_Teff']-1],\
#                 self.data[:,self.cols['log_L']-1],\
#                 label = "M="+str(self.header_attr['initial_mass'])+", Z="\
#                 +str(self.header_attr['initial_z']))

        pyl.xlabel('$\log T_{\\rm eff}$')
        pyl.ylabel('$\log L$')
        x1,x2=pl.xlim()
        if x2 > x1:
            ax=pl.gca()
            ax.invert_xaxis()