class_docstr: BasicTimeProfiler can be used to profile the handlers,
  events, data loading and data processing times.
  
  Examples:
      .. code-block:: python
  
          from ignite.handlers import BasicTimeProfiler
  
          trainer = Engine(train_updater)
  
          # Create an object of the profiler and attach an engine to it
          profiler = BasicTimeProfiler()
          profiler.attach(trainer)
  
          @trainer.on(Events.EPOCH_COMPLETED)
          def log_intermediate_results():
              profiler.print_results(profiler.get_results())
  
          trainer.run(dataloader, max_epochs=3)
  
          profiler.write_results('path_to_dir/time_profiling.csv')
  
  .. versionadded:: 0.4.6
class_docstr_tok: ["BasicTimeProfiler","can","be","used","to","profile","the","handlers",",","events",",","data","loading","and","data","processing","times",".","Examples",":","..","code-block",":",":","python","from","ignite.handlers","import","BasicTimeProfiler","trainer","=","Engine","(","train_updater",")","#","Create","an","object","of","the","profiler","and","attach","an","engine","to","it","profiler","=","BasicTimeProfiler","(",")","profiler.attach","(","trainer",")","@","trainer.on","(","Events.EPOCH_COMPLETED",")","def","log_intermediate_results","(",")",":","profiler.print_results","(","profiler.get_results","(",")",")","trainer.run","(","dataloader",",","max_epochs=3",")","profiler.write_results","(","'path_to_dir\/time_profiling.csv","'",")","..","versionadded",":",":","0.4.6"]
code: def _as_last_get_batch_completed(self, engine: Engine) -> None:
      t = self._event_handlers_timer.value()
      i = engine.state.iteration - 1
      self.event_handlers_times[Events.GET_BATCH_COMPLETED][i] = t
  
      d = self._dataflow_timer.value()
      self.dataflow_times[i] = d
  
      self._dataflow_timer.reset()
  
imports: import functools
  from collections import OrderedDict
  from typing import Any, Callable, cast, Dict, List, Mapping, Sequence, Tuple, Union
  import torch
  from ignite.engine import Engine, EventEnum, Events
  from ignite.handlers.timing import Timer
label_desc: Use image node_id 10 for calling the BasicTimeProfiler obj's underlying member method code with example usage: obj._as_last_get_batch_completed(engine) without return types