code: def batch_print(
      epoch,
      i,
      batch_verbose_freq,
      n_batches,
      btic,
      loss_rel_val,
      metric_list,
  ):
      if (i + 1) % batch_verbose_freq == 0:
          print_txt = (
              "Epoch[%d] Batch[%d/%d], time: %d, loss_rel=%.4f "
              % (
                  epoch,
                  i,
                  n_batches,
                  int(time.time() - btic),
                  loss_rel_val / (i + 1),
              )
          )
          for metric in metric_list:
              metric_name, metric_val = metric.get()
              print_txt += "%s=%.4f " % (metric_name, metric_val)
          logger.info(print_txt)
          btic = time.time()
          loss_rel_val = 0
      return btic, loss_rel_val
  
file_path: dgl/examples/mxnet/scenegraph/train_reldn.py
imports: import argparse
  import logging
  import time
  import mxnet
  import numpy
  from data import *
  from gluoncv.data.batchify import Pad
  from gluoncv.utils import makedirs
  from model import faster_rcnn_resnet101_v1d_custom, RelDN
  from mxnet import gluon, nd
  from utils import *
  import dgl
label_desc: Use image node_id 3 for calling a global function with example usage: batch_print(epoch, i, batch_verbose_freq, n_batches, btic, loss_rel_val, metric_list) and returns: btic,  loss_rel_val