class_docstr: Base class for Air's Keras callbacks.
code: def __init__(self, on: Union[str, List[str]] = "validation_end"):
      super(_Callback, self).__init__()
  
      if not isinstance(on, list):
          on = [on]
      if any(w not in self._allowed for w in on):
          raise ValueError(
              "Invalid trigger time selected: {}. Must be one of {}".format(
                  on, self._allowed
              )
          )
      self._on = on
  
imports: import shutil
  from typing import Dict, List, Optional, Union
  from tensorflow.keras.callbacks import Callback
  import ray
  from ray.train.tensorflow import TensorflowCheckpoint
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 1 to create a new _Callback object from inherited base classes: KerasCallback with example: obj = _Callback(on)