class_docstr: `Callback` that can be used to register hooks on `modules`
docstr: Register the `Hooks` on `self.modules`.
docstr_tok: ["Register","the","`","Hooks","`","on","`","self.modules","`","."]
code: def before_fit(self):
      "Register the `Hooks` on `self.modules`."
      if self.modules is None:
          self.modules = [
              m
              for m in flatten_model(self.model)
              if self.include_paramless or has_params(m)
          ]
      if self.every is None:
          self._register()
  
imports: from __future__ import annotations
  from ..basics import *
label_desc: Use image node_id 2 for calling the HookCallback obj's underlying member method code with example usage: obj.before_fit() without return types