code: def _get_checkpoint_index(checkpoint_dir_name: str) -> int:
      """Gets the checkpoint index from the checkpoint directory name."""
      return int(checkpoint_dir_name.split("_")[-1])
  
imports: import logging
  import os
  import pickle
  import re
  import shutil
  import tempfile
  import time
  from contextlib import contextmanager
  from pathlib import Path
  from typing import List, Optional, Tuple
  import pyarrow.fs
  import pytest
  import ray
  from ray import train, tune
  from ray._private.test_utils import simulate_storage
  from ray.air._internal.uri_utils import URI
  from ray.air.constants import EXPR_RESULT_FILE
  from ray.train._checkpoint import Checkpoint
  from ray.train._internal.storage import StorageContext, _delete_fs_path, _download_from_fs_path
  from ray.train.base_trainer import TrainingFailedError
  from ray.train.data_parallel_trainer import DataParallelTrainer
  from ray.tune.trainable.trainable import _DICT_CHECKPOINT_FILE_NAME
label_desc: Use image node_id 8 for calling a global function with example usage: _get_checkpoint_index(checkpoint_dir_name) and returns: int