code: def install_py4j_hooks():
      """
      Hook the classes such as JavaPackage, etc of Py4j to improve the exception message.
      """
  
      def wrapped_call(self, *args, **kwargs):
          raise TypeError(
              "Could not found the Java class '%s'. The Java dependencies could be specified via "
              "command line argument '--jarfile' or the config option 'pipeline.jars'"
              % self._fqn
          )
  
      setattr(py4j.java_gateway.JavaPackage, "__call__", wrapped_call)
  
imports: import py4j
  from py4j.protocol import Py4JJavaError
label_desc: Use image node_id 3 for calling a global function with example usage: install_py4j_hooks() without return types