code: def __init__(
      self,
      batch: SampleList = None,
      model_output: Dict[str, Any] = None,
      *args,
  ):
      super().__init__(self)
      if batch is None:
          return
      if model_output is None:
          model_output = {}
      if self._check_and_load_tuple(batch):
          return
  
      all_args = [batch, model_output] + [*args]
      for idx, arg in enumerate(all_args):
          if not isinstance(arg, collections.abc.Mapping):
              raise TypeError(
                  "Argument {:d}, {} must be of instance of "
                  "collections.abc.Mapping".format(idx, arg)
              )
  
      self.batch_size = batch.get_batch_size()
      self.warning_string = (
          "Updating forward report with key {}"
          "{}, but it already exists in {}. "
          "Please consider using a different key, "
          "as this can cause issues during loss and "
          "metric calculations."
      )
  
      for idx, arg in enumerate(all_args):
          for key, item in arg.items():
              if key in self and idx >= 2:
                  log = self.warning_string.format(
                      key, "", "in previous arguments to report"
                  )
                  warnings.warn(log)
              self[key] = item
  
imports: import collections
  import collections.abc
  import copy
  import warnings
  from collections import OrderedDict
  from typing import Any, Callable, Dict, List, Optional, Union
  import torch
  from mmf.common.sample import detach_tensor, SampleList
label_desc: Use image node_id 1 to create a new Report object from inherited base classes: OrderedDict with example: obj = Report(batch, model_output)