code: def test_wandb_logger_download_artifact(wandb_mock, tmp_path):
      """Test that download_artifact works."""
      wandb_mock.run = wandb_mock.init()
      logger = WandbLogger()
      logger.download_artifact(
          "test_artifact", str(tmp_path), "model", True
      )
      wandb_mock.run.use_artifact.assert_called_once_with(
          "test_artifact"
      )
  
      wandb_mock.run = None
  
      WandbLogger.download_artifact(
          "test_artifact", str(tmp_path), "model", True
      )
  
      wandb_mock.Api().artifact.assert_called_once_with(
          "test_artifact", type="model"
      )
  
imports: import os
  import pickle
  from unittest import mock
  import pytest
  import yaml
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.cli import LightningCLI
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import WandbLogger
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning_utilities.test.warning import no_warning_call
label_desc: Use image node_id 10 for calling a global function with example usage: test_wandb_logger_download_artifact(wandb_mock, tmp_path) without return types