code: def test_use_artifact_offline(mock_run):
      run = mock_run(settings=wandb.Settings(mode="offline"))
      with pytest.raises(Exception) as e_info:
          run.use_artifact("boom-data")
          assert (
              str(e_info.value)
              == "Cannot use artifact when in offline mode."
          )
  
imports: import copy
  import os
  import platform
  import unittest.mock
  import numpy
  import pytest
  import wandb
  import wandb.errors
  from wandb import wandb_sdk
label_desc: Use image node_id 14 for calling a global function with example usage: test_use_artifact_offline(mock_run) without return types