code: def callJavaFunc(
      sc: pyspark.context.SparkContext,
      func: Callable[..., "JavaObjectOrPickleDump"],
      *args: Any,
  ) -> Any:
      """Call Java Function"""
      java_args = [_py2java(sc, a) for a in args]
      return _java2py(sc, func(*java_args))
  
file_path: spark/python/pyspark/mllib/common.py
imports: from typing import Any, Callable, TYPE_CHECKING
  import py4j.protocol
  from py4j.protocol import Py4JJavaError
  from py4j.java_gateway import JavaObject
  from py4j.java_collections import JavaArray, JavaList
  import pyspark.context
  from pyspark import RDD, SparkContext
  from pyspark.serializers import CPickleSerializer, AutoBatchedSerializer
  from pyspark.sql import DataFrame, SparkSession
label_desc: Use image node_id 5 for calling a global function with example usage: callJavaFunc(sc, func) and returns: _java2py