def _call_java(sc, java_obj, name, *args):
m = getattr(java_obj, name)<EOL>java_args = [_py2java(sc, arg) for arg in args]<EOL>return _java2py(sc, m(*java_args))<EOL>
Method copied from pyspark.ml.wrapper.  Uses private Spark APIs.