code: def test__download_compute_worker_run_artifact_by_type__no_artifacts(
      mocker: MockerFixture,
  ) -> None:
      client = ApiWorkflowClient(token="123")
      mock_download_compute_worker_run_artifact = mocker.MagicMock(
          spec_set=client._download_compute_worker_run_artifact
      )
      client._download_compute_worker_run_artifact = (
          mock_download_compute_worker_run_artifact
      )
      run = DockerRunData(
          id=utils.generate_id(),
          user_id="user-id",
          dataset_id=utils.generate_id(),
          docker_version="",
          state=DockerRunState.COMPUTING_METADATA,
          created_at=0,
          last_modified_at=0,
          artifacts=None,
      )
      with pytest.raises(
          ArtifactNotExist, match="Run has no artifacts."
      ):
          client._download_compute_worker_run_artifact_by_type(
              run=run,
              artifact_type=DockerRunArtifactType.CHECKPOINT,
              output_path="output_dir/checkpoint.ckpt",
              timeout=0,
          )
  
file_path: lightly/tests/api_workflow/test_api_workflow_artifacts.py
imports: import pytest
  from pytest_mock import MockerFixture
  from lightly.api import ApiWorkflowClient, ArtifactNotExist
  from lightly.openapi_generated.swagger_client.api import DockerApi
  from lightly.openapi_generated.swagger_client.models import DockerRunArtifactData, DockerRunArtifactType, DockerRunData, DockerRunState
  from tests.api_workflow import utils
label_desc: Use image node_id 3 for calling a global function with example usage: test__download_compute_worker_run_artifact_by_type__no_artifacts(mocker) without return types