class_docstr: Class implementing PolynomialFeatures operators in PyTorch.
  
  # TODO extend this class to support higher orders
code: def forward(self, x):
      x_orig = x
      x = x.view(-1, self.n_features, 1) * x.view(
          -1, 1, self.n_features
      )
      x = x.view(-1, self.n_features**2)
      x = torch.index_select(x, 1, self.indices)
  
      # TODO: This gives mismatched elements
      # if self.interaction_only:
      #    if self.include_bias:
      #        bias = self.bias.expand(x_orig.size()[0], 1)
      #        return torch.cat([bias, x], dim=1)
      #    else:
      #        return x
  
      if self.include_bias:
          bias = self.bias.expand(x_orig.size()[0], 1)
          return torch.cat([bias, x_orig, x], dim=1)
      else:
          return torch.cat([x_orig, x], dim=1)
  
file_path: hummingbird/hummingbird/ml/operator_converters/sklearn/poly_features.py
imports: from .._physical_operator import PhysicalOperator
  from onnxconverter_common.registration import register_converter
  import torch
label_desc: Use image node_id 2 for calling the PolynomialFeatures obj's underlying member method code with example usage: obj.forward(x) and returns: torch, torch