class_docstr: A base class for training hooks in PyTorch.
  
  This class provides a template for implementing custom training hooks
  that can be activated, deactivated, and maintain a handle to the hook.
  
  Attributes:
      _hook_handle (Optional[torch.utils.hooks.RemovableHandle]): A handle to the
          registered forward hook, initially set to None.
code: def __init__(self, *args, **kwargs) -> None:
      self._hook_handle = None
  
file_path: ludwig/ludwig/modules/training_hooks.py
imports: import logging
  from abc import ABC, abstractmethod
  import torch
label_desc: Use image node_id 1 to create a new TrainingHook object from inherited base classes: ABC with example: obj = TrainingHook()