code: def _to_java(self):
          
  
          estimator, epms, evaluator = super(TrainValidationSplit, self)._to_java_impl()
  
          _java_obj = JavaParams._new_java_obj("org.apache.spark.ml.tuning.TrainValidationSplit",
                                               self.uid)
          _java_obj.setEstimatorParamMaps(epms)
          _java_obj.setEvaluator(evaluator)
          _java_obj.setEstimator(estimator)
          _java_obj.setTrainRatio(self.getTrainRatio())
          _java_obj.setSeed(self.getSeed())
          _java_obj.setParallelism(self.getParallelism())
          _java_obj.setCollectSubModels(self.getCollectSubModels())
          return _java_obj
docs: Transfer this instance to a Java TrainValidationSplit. Used for ML persistence.
          :return: Java object equivalent to this instance.