code: def add_batch_stats(
      self, n_batches, preds, targets, scores, loss, m_input, **context
  ):
      self.total_loss += loss.item()
      self.num_batches += 1
      # losses are weighted in DisjointMultitaskModel. Here we undo the
      # weighting for proper reporting.
      if self.loss_weights[context[BatchContext.TASK_NAME]] != 0:
          loss /= self.loss_weights[context[BatchContext.TASK_NAME]]
      reporter = self.reporters[context[BatchContext.TASK_NAME]]
      reporter.add_batch_stats(
          n_batches, preds, targets, scores, loss, m_input, **context
      )
  
file_path: pytext/pytext/metric_reporters/disjoint_multitask_metric_reporter.py
imports: from typing import Dict, Optional
  from pytext.common.constants import BatchContext
  from .metric_reporter import MetricReporter
label_desc: Use image node_id 4 for calling the DisjointMultitaskMetricReporter obj's underlying member method code with example usage: obj.add_batch_stats(n_batches, preds, targets, scores, loss, m_input) without return types