code: def _update(self, y_pred, y_true):
      output = self.func(y_pred, y_true)
  
      # In order to aggregate the batches, it is simpler to put into a NumPy array all relevant values.
      np_output = self._output_to_array(output)
      batch_size = get_batch_size(y_pred, y_true)
      self.output_sums += np_output * batch_size
      self.size += batch_size
  
      # We return `output` on purpose in order to keep the tensors as is so that a DecomposableMetric object can
      # be used as a loss function.
      return output
  
file_path: poutyne/poutyne/framework/metrics/decomposable.py
imports: from typing import Iterable, Mapping
  import numpy
  import torch
  import torch.nn
  from poutyne.framework.metrics.base import Metric
  from poutyne.utils import get_batch_size
label_desc: Use image node_id 4 for calling the DecomposableMetric obj's underlying member method code with example usage: obj._update(y_pred, y_true) and returns: output