code: def test_sync_job_config(shutdown_only):
      runtime_env = {"env_vars": {"key": "value"}}
  
      ray.init(
          job_config=ray.job_config.JobConfig(
              runtime_env=runtime_env,
          )
      )
  
      # Check that the job config is synchronized at the driver side.
      job_config = (
          ray._private.worker.global_worker.core_worker.get_job_config()
      )
      job_runtime_env = RuntimeEnv.deserialize(
          job_config.runtime_env_info.serialized_runtime_env
      )
      assert job_runtime_env.env_vars() == runtime_env["env_vars"]
  
      @ray.remote
      def get_job_config():
          job_config = (
              ray._private.worker.global_worker.core_worker.get_job_config()
          )
          return job_config.SerializeToString()
  
      # Check that the job config is synchronized at the worker side.
      job_config = gcs_utils.JobConfig()
      job_config.ParseFromString(ray.get(get_job_config.remote()))
      job_runtime_env = RuntimeEnv.deserialize(
          job_config.runtime_env_info.serialized_runtime_env
      )
      assert job_runtime_env.env_vars() == runtime_env["env_vars"]
  
imports: import glob
  import logging
  import multiprocessing
  import os
  import sys
  import tempfile
  import time
  from unittest import mock
  import numpy
  import psutil
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray._private.ray_constants
  import ray._private.utils
  import ray.cluster_utils
  import ray.util.accelerators
  from ray._private.test_utils import wait_for_condition
  from ray.dashboard import k8s_utils
  from ray.runtime_env import RuntimeEnv
label_desc: Use image node_id 12 for calling a global function with example usage: test_sync_job_config(shutdown_only) and returns: job_config