code: def forward(self, *x):
      if self.is_classifier:
          x = [
              t[1].view(-1, 1)
              if len(t[1].shape) == 1
              else t[1][:, 1].view(-1, 1)
              for t in x
          ]
  
      output = torch.cat(x, dim=1)
      output = torch.sum(output, dim=1) / self.n_estimators
  
      if not self.is_classifier:
          return output
      if self.binary_classification:
          output = torch.stack([1 - output, output], dim=1)
  
      if self.perform_class_select:
          return (
              torch.index_select(
                  self.classes, 0, torch.argmax(output, dim=1)
              ),
              output,
          )
      else:
          return torch.argmax(output, dim=1), output
  
file_path: hummingbird/hummingbird/ml/operator_converters/sklearn/bagging.py
imports: from packaging.version import Version, parse
  import numpy
  from onnxconverter_common.registration import register_converter
  import torch
  from .._physical_operator import PhysicalOperator
label_desc: Use image node_id 2 for calling the Bagging obj's underlying member method code with example usage: obj.forward() and returns: output, torch,  output, torch,  output