code: def test_new_cluster_new_session_dir(ray_start_cluster):
      cluster = ray_start_cluster
      cluster.add_node()
      ray.init(address=cluster.address)
      session_dir = (
          ray._private.worker._global_node.get_session_dir_path()
      )
      ray.shutdown()
      cluster.shutdown()
      cluster.add_node()
      ray.init(address=cluster.address)
      if enable_external_redis():
          assert (
              ray._private.worker._global_node.get_session_dir_path()
              == session_dir
          )
      else:
          assert (
              ray._private.worker._global_node.get_session_dir_path()
              != session_dir
          )
      ray.shutdown()
      cluster.shutdown()
  
imports: import os
  import sys
  import unittest.mock
  import signal
  import subprocess
  import grpc
  import pytest
  import ray
  import ray._private.services
  from ray.client_builder import ClientContext
  from ray.cluster_utils import Cluster
  from ray.util.client.common import ClientObjectRef
  from ray.util.client.ray_client_helpers import ray_start_client_server
  from ray.util.client.worker import Worker
  from ray._private.test_utils import wait_for_condition, enable_external_redis
label_desc: Use image node_id 12 for calling a global function with example usage: test_new_cluster_new_session_dir(ray_start_cluster) without return types