code: def to_java_params(sc, model, pyParamMap):
      paramMap = JavaWrapper._new_java_obj(
          "org.apache.spark.ml.param.ParamMap"
      )
      for param, value in pyParamMap.items():
          java_param = model._java_obj.getParam(param.name)
          java_value = _py2java(sc, value)
          paramMap.put([java_param.w(java_value)])
      return paramMap
  
file_path: SynapseML/vw/src/main/python/synapse/ml/vw/VowpalWabbitPythonBase.py
imports: from pyspark.ml.common import inherit_doc
  from pyspark import SparkContext, SQLContext
  from pyspark.sql import DataFrame
  from pyspark.ml.wrapper import JavaWrapper
  from pyspark.ml.common import _py2java
label_desc: Use image node_id 1 for calling a global function with example usage: to_java_params(sc, model, pyParamMap) and returns: paramMap