code: def test_download_model(mock_download_file_from_url, mock_client):
      mock_client = mock_client()
  
      mock_client.models_store_download_model.return_value = (
          V1DownloadModelResponse(
              download_url="https://test",
          )
      )
  
      download_model(
          "test-username/test-model", "test.ckpt", version="0.0.1"
      )
  
      mock_client.models_store_download_model.assert_called_once_with(
          name="test-username/test-model",
          version="0.0.1",
      )
  
      mock_download_file_from_url.assert_called_once_with(
          "https://test",
          os.path.abspath("test.ckpt"),
          progress_bar=True,
      )
  
imports: import os
  from unittest import mock
  from lightning.store import download_model, list_models, upload_model
  from lightning_cloud.openapi import V1DownloadModelResponse, V1GetUserResponse, V1ListMembershipsResponse, V1ListModelsResponse, V1Membership, V1Model, V1Project, V1UploadModelRequest, V1UploadModelResponse
label_desc: Use image node_id 2 for calling a global function with example usage: test_download_model(mock_download_file_from_url, mock_client) without return types