code: def iter_summary(
      self,
      epoch: int,
      n_processed_samples: int,
      total_samples: int,
      elapsed_time: float,
      learning_rate: float or list,
  ) -> None:
      if self.is_master_node:
          metric_stats = self._avg_statistics_all()
          el_time_str = "Elapsed time: {:5.2f}".format(
              time.time() - elapsed_time
          )
          if isinstance(learning_rate, float):
              lr_str = "LR: {:1.6f}".format(learning_rate)
          else:
              learning_rate = [round(lr, 6) for lr in learning_rate]
              lr_str = "LR: {}".format(learning_rate)
          epoch_str = "Epoch: {:3d} [{:8d}/{:8d}]".format(
              epoch, n_processed_samples, total_samples
          )
          batch_str = "Avg. batch load time: {:1.3f}".format(
              self.batch_time / self.batch_counter
          )
  
          stats_summary = [epoch_str]
          stats_summary.extend(metric_stats)
          stats_summary.append(lr_str)
          stats_summary.append(batch_str)
          stats_summary.append(el_time_str)
  
          summary_str = ", ".join(stats_summary)
          logger.log(summary_str)
          sys.stdout.flush()
  
imports: import argparse
  import sys
  import time
  import traceback
  from numbers import Number
  from typing import Any, Dict, List, Optional, Union
  import numpy
  import torch
  from torch import Tensor
  from metrics import METRICS_REGISTRY
  from metrics.metric_base import BaseMetric
  from utils import logger
  from utils.object_utils import apply_recursively, flatten_to_dict
label_desc: Use image node_id 6 for calling the Statistics obj's underlying member method code with example usage: obj.iter_summary(epoch, n_processed_samples, total_samples, elapsed_time, learning_rate) without return types