class_docstr: Trainer extension to aggregate an observation in the trainer.
  Args:
       comm: ChainerMN communicator
       original_key (str): Key of the observation to be summarized.
       If the observation is a :class:`chainer.Variable`, its value
       is automatically copied to CPU.
       aggregated_key (str): Name of the key after the summarization.
       If not specified, it is set to `original_key` to overwrite it.
       comm_trigger: Trigger that decides the timing to communicate
       observation values for aggregation.
       aggregator (function): Function to compute summarization from
       individual values. It takes a list of lists of observed values.
       Each list contains all the observed values since
       the last communication.
code: def __init__(
      self,
      comm,
      original_key,
      aggregated_key=None,
      *,
      comm_trigger=(1, "iteration"),
      aggregator=None,
  ):
      self.comm = comm
      self.original_key = original_key
  
      if aggregated_key is None:
          self.aggregated_key = original_key
      else:
          self.aggregated_key = aggregated_key
  
      self.comm_trigger = util.get_trigger(comm_trigger)
      self.observation_history = []
      self.aggregator = aggregator or _average_2d
  
file_path: chainer/chainermn/extensions/observation_aggregator.py
imports: from __future__ import division
  from chainer.training import extension, util
  from chainer import Variable
  import chainerx
label_desc: Use image node_id 1 to create a new ObservationAggregator object from inherited base classes: extension with example: obj = ObservationAggregator(comm, original_key, aggregated_key)