class_docstr: Create a hook on `m` with `hook_func`.
docstr: Applies `hook_func` to `module`, `input`, `output`.
docstr_tok: ["Applies","`","hook_func","`","to","`","module","`",",","`","input","`",",","`","output","`","."]
code: def hook_fn(self, module, input, output):
      "Applies `hook_func` to `module`, `input`, `output`."
      if self.detach:
          input, output = to_detach(
              input, cpu=self.cpu, gather=self.gather
          ), to_detach(output, cpu=self.cpu, gather=self.gather)
      self.stored = self.hook_func(module, input, output)
  
imports: from __future__ import annotations
  from ..basics import *
label_desc: Use image node_id 2 for calling the Hook obj's underlying member method code with example usage: obj.hook_fn(module, input, output) without return types