Should I use "self.opt" or "" in callbackhandler

I’m reading the course-v3 ***.ipynb , , and I was wondering whether should I use “self.opt” or “” in the callbackhanders. such as: “class Recorder(Callback):” ,“class ParamScheduler(Callback):” and so on.
here is the code I am geting confused:

class Recorder(Callback):
    def begin_fit(self): self.lrs,self.losses = [],[]

    def after_batch(self):
        if not self.in_train: return #or using: if not return
        self.lrs.append(self.opt.hypers[-1]['lr'])  #or using:  self.lrs.append([-1]['lr']) 
        self.losses.append(self.loss.detach().cpu()) #or using:  self.losses.append( 

class ParamScheduler(Callback):
    def __init__(self, pname, sched_funcs):
        self.pname,self.sched_funcs = pname,listify(sched_funcs)

    def begin_batch(self): 
        if not self.in_train: return
        fs = self.sched_funcs
        if len(fs)==1: fs = fs*len(self.opt.param_groups) #or using:  if len(fs)==1: fs = fs*len(
        pos = self.n_epochs/self.epochs #or using: pos =
        for f,h in zip(fs,self.opt.hypers): h[self.pname] = f(pos) #or using:   for f,h in zip(fs, h[self.pname] = f(pos)

Because , I find the attributes: "opt , loss,n_epochs, epochs… " are only defined in the Learner(), they are passed to every CallbackHander by the Callback() class through the code:

class Callback():
    def set_runner(self, run):