code: def convert_sklearn_poly_features(operator, device, extra_config):
      """
      Converter for `sklearn.preprocessing.PolynomialFeatures`
  
      Currently this supports only degree 2, and does not support interaction_only
  
      Args:
          operator: An operator wrapping a `sklearn.preprocessing.PolynomialFeatures` model
          device: String defining the type of device the converted operator should be run on
          extra_config: Extra configuration used to select the best conversion strategy
  
      Returns:
          A PyTorch model
      """
      assert operator is not None, "Cannot convert None operator"
  
      if operator.raw_operator.interaction_only:
          raise NotImplementedError(
              "Hummingbird does not currently support interaction_only flag for PolynomialFeatures"
          )
  
      if operator.raw_operator.degree != 2:
          raise NotImplementedError(
              "Hummingbird currently only supports degree 2 for PolynomialFeatures"
          )
      return PolynomialFeatures(
          operator,
          operator.raw_operator.n_features_in_,
          operator.raw_operator.degree,
          operator.raw_operator.interaction_only,
          operator.raw_operator.include_bias,
          device,
      )
  
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 1 for calling a global function with example usage: convert_sklearn_poly_features(operator, device, extra_config) and returns: PolynomialFeatures