code: def forward(self, *input, **kwargs):  # skipcq: PYL-W0221
      outputs = [model(*input, **kwargs) for model in self.models]
  
      if self.return_some_outputs:
          keys = self.outputs
      elif isinstance(outputs[0], dict):
          keys = outputs[0].keys()
          output_is_dict = True
      elif isinstance(outputs[0], (list, tuple)):
          keys = list(range(len(outputs[0])))
          output_is_dict = False
      elif torch.is_tensor(outputs[0]):
          keys = None
      else:
          raise RuntimeError()
  
      if keys is None:
          predictions = torch.stack(outputs)
          predictions = _deaugment_averaging(
              predictions, self.reduction
          )
          averaged_output = predictions
      else:
          averaged_output = {} if output_is_dict else []
          for key in keys:
              predictions = [output[key] for output in outputs]
              predictions = torch.stack(predictions)
              predictions = _deaugment_averaging(
                  predictions, self.reduction
              )
              if output_is_dict:
                  averaged_output[key] = predictions
              else:
                  averaged_output.append(predictions)
  
      return averaged_output
  
imports: import torch
  from torch import nn, Tensor
  from typing import List, Union, Iterable, Optional, Dict, Tuple
  from pytorch_toolbelt.inference.tta import _deaugment_averaging
label_desc: Use image node_id 2 for calling the Ensembler obj's underlying member method code with example usage: obj.forward() and returns: averaged_output