class_docstr: ``FlashCallback`` is an extension of :class:`pytorch_lightning.callbacks.Callback`.
  
  A callback is a self-contained program that can be reused across projects. Flash and Lightning have a callback
  system to execute callbacks when needed. Callbacks should capture any NON-ESSENTIAL logic that is NOT required for
  your lightning module to run.
  
  Same as PyTorch Lightning, Callbacks can be provided directly to the Trainer::
  
      trainer = Trainer(callbacks=[MyCustomCallback()])
docstr: Called once ``per_sample_transform_on_device`` has been applied to a sample.
docstr_tok: ["Called","once","``","per_sample_transform_on_device","``","has","been","applied","to","a","sample","."]
code: def on_per_sample_transform_on_device(
      self, sample: Any, running_stage: RunningStage
  ) -> None:
      """Called once ``per_sample_transform_on_device`` has been applied to a sample."""
  
imports: from contextlib import contextmanager
  from typing import Any, List, Sequence
  from pytorch_lightning.callbacks import Callback
  from torch import Tensor
  import flash
  from flash.core.data.utils import _STAGES_PREFIX
  from flash.core.utilities.stages import RunningStage
label_desc: Use image node_id 4 for calling the FlashCallback obj's underlying member method code with example usage: obj.on_per_sample_transform_on_device(sample, running_stage) without return types