code: def storage_conf_of_checkpoint(
      sample_checkpoint: checkpoint.Checkpoint,
  ) -> StorageConfig:
      if (
          sample_checkpoint.training is None
          or sample_checkpoint.training.experiment_config is None
      ):
          raise ValueError(
              "Test depends on an existing experiment_config within the tested checkpoint."
          )
      storage_conf = sample_checkpoint.training.experiment_config[
          "checkpoint_storage"
      ]
      return cast(StorageConfig, storage_conf)
  
file_path: determined/harness/tests/determined/common/experimental/test_checkpoint.py
imports: import os
  import re
  from typing import Dict, Optional, Union, cast
  from unittest import mock
  import pytest
  import responses
  from determined.common import api, storage
  from determined.common.experimental import checkpoint
  from tests.fixtures import api_responses
label_desc: Use image node_id 3 for calling a global function with example usage: storage_conf_of_checkpoint(sample_checkpoint) and returns: cast