class_docstr: Abstract base class used to build new callbacks.
  
  Subclass this class and override any of the relevant hooks
class_docstr_tok: ["Abstract","base","class","used","to","build","new","callbacks",".","Subclass","this","class","and","override","any","of","the","relevant","hooks"]
docstr: Called when saving a checkpoint, implement to generate callback's ``state_dict``.
  
  Returns:
      A dictionary containing callback state.
docstr_tok: ["Called","when","saving","a","checkpoint",",","implement","to","generate","callback","'s","``","state_dict","``",".","Returns",":","A","dictionary","containing","callback","state","."]
code: def state_dict(self) -> Dict[str, Any]:
      """Called when saving a checkpoint, implement to generate callback's ``state_dict``.
  
      Returns:
          A dictionary containing callback state.
  
      """
      return {}
  
imports: from typing import Any, Dict, Type
  from torch import Tensor
  from torch.optim import Optimizer
  import lightning.pytorch
  from lightning.pytorch.utilities.types import STEP_OUTPUT
label_desc: Use image node_id 35 for calling the Callback obj's underlying member method code with example usage: obj.state_dict() and returns: dict