code: def __init__(
      self,
      start_benchmark_at_step: int = 0,
      stop_benchmark_at_step: Optional[int] = None,
      log_every_n_steps: int = 10,
  ):
      super().__init__()
      self.start_benchmark_at_step = start_benchmark_at_step
      self.stop_benchmark_at_step = stop_benchmark_at_step
      self.log_every_n_steps = log_every_n_steps
      self.train_times = []
      self.val_times = []
      self.train_steps_times = []
      self.val_steps_times = []
  
file_path: NeMo/examples/multimodal/x_to_nerf/benchmark_callback.py
imports: import time
  from typing import Optional
  from pytorch_lightning import Callback, LightningModule, Trainer
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new BenchmarkCallback object from inherited base classes: Callback with example: obj = BenchmarkCallback(start_benchmark_at_step, stop_benchmark_at_step, log_every_n_steps)