code: def on_iteration_end(self, logs, predictions):
      for metric in self.metrics:
          train_loss = 0
          if predictions.get("y_train_predicted") is not None:
              train_loss = metric(
                  predictions.get("y_train_true"),
                  predictions.get("y_train_predicted"),
              )
          validation_loss = metric(
              predictions.get("y_validation_true"),
              predictions.get("y_validation_predicted"),
          )
          self.loss_values[self.current_learner_uid]["train"][
              metric.name
          ] += [train_loss]
          self.loss_values[self.current_learner_uid]["validation"][
              metric.name
          ] += [validation_loss]
          # keep information about iter number only once :)
          if metric == self.metrics[0]:
              self.loss_values[self.current_learner_uid]["iters"] += [
                  logs.get("iter_cnt")
              ]
  
file_path: mljar-supervised/supervised/callbacks/metric_logger.py
imports: import logging
  import numpy
  from supervised.callbacks.callback import Callback
  from supervised.utils.metric import Metric
label_desc: Use image node_id 3 for calling the MetricLogger obj's underlying member method code with example usage: obj.on_iteration_end(logs, predictions) without return types