code: def run(self, batch: Batch, train: bool=False, stream: StreamWrapper=None) -> Batch:
          
          if train:
              raise ValueError('Ensemble model cannot be trained.')
          self._load_models()
  
          # run all the models
          batch_outputs = [model.run(batch, False, stream) for model in self._models]
  
          # aggregate the outputs
          aggregated = {}
          for output_name in self._outputs:
              output_values = [batch_output[output_name] for batch_output in batch_outputs]
              if self._aggregation == 'mean':
                  aggregated[output_name] = np.mean(output_values, axis=0)
              elif self._aggregation == 'major_vote':
                  output_values_arr = np.array(output_values)
                  output = major_vote(output_values_arr.reshape((output_values_arr.shape[0], -1)))
                  aggregated[output_name] = np.array(output).reshape(output_values_arr[0].shape)
  
          return aggregated
docs: Run feed-forward pass with the given batch using all the models, aggregate and return the results.
  
          .. warning::
              :py:class:`Ensemble` can not be trained.
  
          :param batch: batch to be processed
          :param train: ``True`` if this batch should be used for model update, ``False`` otherwise
          :param stream: stream wrapper (useful for precise buffer management)
          :return: aggregated results dict
          :raise ValueError: if the ``train`` flag is set to ``True``