class_docstr: A callback which profiles user code using `PyTorch Profiler <https://pytorch.org/docs/stable/profiler.html/>`_.
  
  Args:
      profiler: a torch.profiler.profile context manager which will be used
code: def __init__(
      self,
      profiler: torch.profiler.profile,
  ) -> None:
      self.profiler: torch.profiler.profile = profiler
  
file_path: tnt/torchtnt/framework/callbacks/pytorch_profiler.py
imports: import torch
  from torchtnt.framework.callback import Callback
  from torchtnt.framework.state import EntryPoint, State
  from torchtnt.framework.unit import TEvalUnit, TPredictUnit, TTrainUnit
label_desc: Use image node_id 1 to create a new PyTorchProfiler object from inherited base classes: Callback with example: obj = PyTorchProfiler(profiler)