class_docstr: Represents a compiled pipeline with transformers and fitted models.
  
  .. versionadded:: 1.3.0
class_docstr_tok: ["Represents","a","compiled","pipeline","with","transformers","and","fitted","models",".","..","versionadded",":",":","1.3.0"]
docstr: Given a Java PipelineModel, create and return a Python wrapper of it.
  Used for ML persistence.
code: def _from_java(cls, java_stage: "JavaObject") -> "PipelineModel":
      """
      Given a Java PipelineModel, create and return a Python wrapper of it.
      Used for ML persistence.
      """
      # Load information from java_stage to the instance.
      py_stages: List[Transformer] = [
          JavaParams._from_java(s) for s in java_stage.stages()
      ]
      # Create a new instance of this stage.
      py_stage = cls(py_stages)
      py_stage._resetUid(java_stage.uid())
      return py_stage
  
imports: import os
  from typing import Any, Dict, List, Optional, Tuple, Type, Union, cast, TYPE_CHECKING
  from pyspark import keyword_only, since, SparkContext
  from pyspark.ml.base import Estimator, Model, Transformer
  from pyspark.ml.param import Param, Params
  from pyspark.ml.util import MLReadable, MLWritable, JavaMLWriter, JavaMLReader, DefaultParamsReader, DefaultParamsWriter, MLWriter, MLReader, JavaMLReadable, JavaMLWritable
  from pyspark.ml.wrapper import JavaParams
  from pyspark.ml.common import inherit_doc
  from pyspark.sql.dataframe import DataFrame
label_desc: Use image node_id 6 for calling the PipelineModel obj's underlying member method code with example usage: obj._from_java(cls, java_stage) and returns: py_stage