code: def _latest_checkpoint_path_distributed() -> None:
      tc = unittest.TestCase()
      is_rank0 = get_global_rank() == 0
  
      if is_rank0:
          temp_dir = tempfile.mkdtemp()
      else:
          temp_dir = ""
      tc.assertIsNone(get_latest_checkpoint_path(temp_dir))
      if is_rank0:
          shutil.rmtree(temp_dir)  # delete temp directory
  
      if is_rank0:
          temp_dir = tempfile.mkdtemp()
          path_1 = os.path.join(temp_dir, "epoch_0_step_0")
          os.mkdir(path_1)
          CheckpointUtilsTest._create_snapshot_metadata(path_1)
          path_2 = os.path.join(temp_dir, "epoch_0_step_100")
          os.mkdir(path_2)
          CheckpointUtilsTest._create_snapshot_metadata(path_2)
  
          # Missing metadata file
          path_3 = os.path.join(temp_dir, "epoch_1_step_100")
          os.mkdir(path_3)
  
          # Ill-formatted name
          path_4 = os.path.join(temp_dir, "epoch_700")
          os.mkdir(path_4)
      else:
          temp_dir = ""
          path_2 = ""
  
      pg = PGWrapper(dist.group.WORLD)
      path_container = [path_2] if is_rank0 else [None]
      pg.broadcast_object_list(path_container, 0)
      expected_path = path_container[0]
      tc.assertEqual(
          get_latest_checkpoint_path(temp_dir, METADATA_FNAME),
          expected_path,
      )
  
      if is_rank0:
          shutil.rmtree(temp_dir)
  
imports: import os
  import shutil
  import tempfile
  import unittest
  import torch
  import torch.distributed
  from torch import nn
  from torch.distributed import launcher
  from torchsnapshot import Snapshot
  from torchsnapshot.snapshot import SNAPSHOT_METADATA_FNAME
  from torchtnt.framework._test_utils import DummyTrainUnit, get_dummy_train_state
  from torchtnt.framework.callbacks._checkpoint_utils import _delete_checkpoint, _metadata_exists, _prepare_app_state_for_checkpoint, _retrieve_checkpoint_dirpaths, get_checkpoint_dirpaths, get_latest_checkpoint_path, rank_zero_read_and_broadcast
  from torchtnt.utils.distributed import get_global_rank, PGWrapper
  from torchtnt.utils.env import init_from_env
  from torchtnt.utils.fsspec import get_filesystem
  from torchtnt.utils.test_utils import get_pet_launch_config, spawn_multi_process
label_desc: Use image node_id 4 for calling the CheckpointUtilsTest obj's underlying member method code with example usage: obj._latest_checkpoint_path_distributed() without return types