code: def test_download_calls_S3StorageManager_download_in_direct_download_mode(
      mock_download: mock.MagicMock,
      sample_checkpoint: checkpoint.Checkpoint,
      tmp_path: os.PathLike,
  ) -> None:
      # Patch boto methods to avoid making actual calls to S3.
      with mock.patch(
          "determined.common.storage.boto3_credential_manager.initialize_boto3_credential_providers"
      ), mock.patch("boto3.resource"), mock.patch.object(
          checkpoint.Checkpoint, "reload"
      ):
          storage_conf = storage_conf_of_checkpoint(sample_checkpoint)
          storage_conf.update(
              {
                  "type": "s3",
                  "secret_key": None,
                  "endpoint_url": None,
                  "prefix": None,
              }
          )
  
          sample_checkpoint.download(
              path=str(tmp_path), mode=checkpoint.DownloadMode.DIRECT
          )
          assert mock_download.call_count == 1
  
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 5 for calling a global function with example usage: test_download_calls_S3StorageManager_download_in_direct_download_mode(mock_download, sample_checkpoint, tmp_path) without return types