code: def toSKLearn(self, model):
          
          if isinstance(model, LogisticRegressionModel):
              return self._toSKLGLM(model, True)
          if isinstance(model, LinearRegressionModel):
              return self._toSKLGLM(model, False)
          else:
              supported_types = map(lambda t: type(t), self._supported_spark_types)
              raise ValueError("Converter.toSKLearn cannot convert type: %s.  Supported types: %s" %
                               (type(model), ", ".join(supported_types)))
docs: Convert a Spark MLlib model from the Pipelines API (spark.ml) to a scikit-learn model.
          Currently supported models:
          - pyspark.ml.classification.LogisticRegressionModel
          - pyspark.ml.regression.LinearRegressionModel
  
          :param model: Spark ML model
          :return: scikit-learn model with equivalent predictive behavior.
                   Currently, parameters or arguments for training are not copied.