class_docstr: The module to calculate throughput. Throughput is defined as the trained examples
  across all ranks per second. For example, if the batch size on each rank is 512
  and there are 32 ranks, throughput is 512 * 32 / time_to_train_one_step.
  
  Args:
      batch_size (int): batch size for the trainer
      world_size (int): the number of trainers
      window_seconds (int): Throughput use time-based window for window_throughput. This
                            argument specify the window size in seconds.
      warmup_steps (int): the number of warmup batches. No Throughput will be calculated
                          before the warmup batches count reached.
  
  Call Args:
      Not supported.
  
  Returns:
      Not supported.
  
  Example::
  
      throughput = ThroughputMetric(
                    batch_size=128,
                    world_size=4,
                    window_seconds=100,
                    warmup_steps=100
                )
code: def _check_window(self) -> None:
      while self._window_time_lapse > self._window_seconds:
          self._window_time_lapse -= (
              self._window_time_lapse_buffer.popleft()
          )
  
file_path: torchrec/torchrec/metrics/throughput.py
imports: import logging
  import math
  import time
  from collections import deque
  from typing import Deque, Dict
  import torch
  import torch.nn
  from torchrec.metrics.metrics_namespace import compose_metric_key, MetricName, MetricNamespace, MetricPrefix
label_desc: Use image node_id 2 for calling the ThroughputMetric obj's underlying member method code with example usage: obj._check_window() without return types