code: def test_cross_language_raise_exception(shutdown_only):
      ray.init(
          job_config=ray.job_config.JobConfig(code_search_path=sys.path)
      )
  
      class PythonObject(object):
          pass
  
      with pytest.raises(Exception, match="transfer"):
          ray.cross_language.java_function("a", "b").remote(
              PythonObject()
          )
  
imports: import pytest
  import sys
  import ray
  import ray.cluster_utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_cross_language_raise_exception(shutdown_only) without return types