code: def test_initialized_local_mode(
      shutdown_only_with_initialization_check,
  ):
      assert not ray.is_initialized()
      ray.init(num_cpus=0, local_mode=True)
      assert ray.is_initialized()
  
imports: import mock
  import subprocess
  import sys
  import pytest
  import ray
  from ray._raylet import check_health
  from ray._private.test_utils import Semaphore, client_test_enabled, wait_for_condition, get_gcs_memory_used
  from ray.experimental.internal_kv import _internal_kv_list
label_desc: Use image node_id 3 for calling a global function with example usage: test_initialized_local_mode(shutdown_only_with_initialization_check) without return types