docstr: Callback to Show speed
          
docstr_tok: ["Callback","to","Show","speed"]
code: def __call__(self, param):
      """Callback to Show speed"""
      count = param.num_update
  
      if self.last_count > count:
          self.init = False
      self.last_count = count
  
      self.loss_metric.update(param.loss[0])
  
      if self.init:
          if count % self.frequent == 0:
              nd.waitall()
              try:
                  speed = (
                      self.frequent
                      * self.batch_size
                      / (time.time() - self.tic)
                  )
                  speed_total = speed * self.size
              except ZeroDivisionError:
                  speed = float("inf")
                  speed_total = float("inf")
  
              # summary loss
              loss_scalar = self.loss_metric.get()
  
              if self.rank == 0:
                  self.summary_writer.add_scalar(
                      tag="loss",
                      value=loss_scalar,
                      global_step=param.num_update,
                  )
              loss_str_format = "[%d][%s]:%.2f " % (
                  param.num_epoch,
                  "loss",
                  loss_scalar,
              )
              self.loss_metric.reset()
  
              if self.rank == 0:
                  self.summary_writer.add_scalar(
                      tag="speed",
                      value=speed,
                      global_step=param.num_update,
                  )
                  self.summary_writer.flush()
                  logging.info(
                      "Iter:%d Rank:%.2f it/sec Total:%.2f it/sec %s",
                      param.num_update,
                      speed,
                      speed_total,
                      loss_str_format,
                  )
  
              self.tic = time.time()
      else:
          self.init = True
          self.tic = time.time()
  
imports: import logging
  import os
  import sys
  import time
  import horovod.mxnet
  import mxnet
  from mxboard import SummaryWriter
  from mxnet import nd
  from default import config
  from evaluation import verification
label_desc: Use image node_id 2 for calling the CallBackLogging obj's underlying member method code with example usage: obj.__call__(param) without return types