class_docstr: Create a hook on `m` with `hook_func`.
code: def __init__(
      self,
      m,
      hook_func,
      is_forward=True,
      detach=True,
      cpu=False,
      gather=False,
  ):
      store_attr("hook_func,detach,cpu,gather")
      f = (
          m.register_forward_hook
          if is_forward
          else m.register_backward_hook
      )
      self.hook = f(self.hook_fn)
      self.stored, self.removed = None, False
  
imports: from __future__ import annotations
  from ..basics import *
label_desc: Use image node_id 1 to create a new Hook object  with example: obj = Hook(m, hook_func, is_forward, detach, cpu, gather)