class_docstr: Base class for Tune's PyTorch Lightning callbacks.
  
  Args:
      When to trigger checkpoint creations. Must be one of
      the PyTorch Lightning event hooks (less the ``on_``), e.g.
      "train_batch_start", or "train_end". Defaults to "validation_end"
code: def _handle(
      self, trainer: Trainer, pl_module: Optional[LightningModule]
  ):
      raise NotImplementedError
  
imports: import inspect
  import logging
  import os
  import tempfile
  import warnings
  from contextlib import contextmanager
  from typing import Dict, List, Optional, Type, Union
  from pytorch_lightning import Callback, Trainer, LightningModule
  from ray import train
  from ray.util import log_once
  from ray.util.annotations import PublicAPI, Deprecated
  from ray.train import Checkpoint
label_desc: Use image node_id 2 for calling the TuneCallback obj's underlying member method code with example usage: obj._handle(trainer, pl_module) without return types