human
I wrote the below code

    def _callback(param):
        'The    checkpoint    function.'
        if (((param.nbatch % period) == 0) and (param.eval_metric is not None)):
            name_value = param.eval_metric.get_name_value()
            for (name, value) in name_value:
                logging.info('Iter[%d]    Batch[%d]    Train-%s=%f', param.epoch, param.nbatch, name, value)
            if auto_reset:
                param.eval_metric.reset()
    return _callback

What's a good function header?
assistant
#Here's a good function header.

def log_train_metric(period, auto_reset=False):