code: def _from_java(cls, java_stage):
          
  
          estimator, epms, evaluator = super(TrainValidationSplit, cls)._from_java_impl(java_stage)
          trainRatio = java_stage.getTrainRatio()
          seed = java_stage.getSeed()
          parallelism = java_stage.getParallelism()
          collectSubModels = java_stage.getCollectSubModels()
          # Create a new instance of this stage.
          py_stage = cls(estimator=estimator, estimatorParamMaps=epms, evaluator=evaluator,
                         trainRatio=trainRatio, seed=seed, parallelism=parallelism,
                         collectSubModels=collectSubModels)
          py_stage._resetUid(java_stage.uid())
          return py_stage
docs: Given a Java TrainValidationSplit, create and return a Python wrapper of it.
          Used for ML persistence.