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