code: def test_quantilediscretizer_converter(self):
      iris = load_iris()
      features = [
          "sepal_length",
          "sepal_width",
          "petal_length",
          "petal_width",
      ]
  
      pd_df = pd.DataFrame(
          data=np.c_[iris["data"], iris["target"]],
          columns=features + ["target"],
      )
      df = sql.createDataFrame(pd_df).select("sepal_length")
  
      quantile = QuantileDiscretizer(
          inputCol="sepal_length",
          outputCol="sepal_length_bucket",
          numBuckets=2,
      )
      model = quantile.fit(df)
  
      test_df = df
      torch_model = convert(model, "torch", test_df)
      self.assertTrue(torch_model is not None)
  
      spark_output = (
          model.transform(test_df)
          .select("sepal_length_bucket")
          .toPandas()
      )
      torch_output_np = torch_model.transform(pd_df[["sepal_length"]])
      np.testing.assert_allclose(
          spark_output.to_numpy(),
          torch_output_np,
          rtol=1e-06,
          atol=1e-06,
      )
  
file_path: hummingbird/tests/test_sparkml_discretizer_converters.py
imports: import unittest
  import warnings
  import numpy
  import torch
  from sklearn.datasets import load_iris
  from hummingbird.ml._utils import sparkml_installed, pandas_installed
  from hummingbird.ml import convert
label_desc: Use image node_id 1 for calling the TestSparkMLDiscretizers obj's underlying member method code with example usage: obj.test_quantilediscretizer_converter() without return types