code: def test_unlogged_artifact_in_config(wandb_init, test_settings):
      run = wandb_init(settings=test_settings())
      artifact = wandb.Artifact("my-arti", type="dataset")
      with pytest.raises(Exception) as e_info:
          run.config.dataset = artifact
          assert (
              str(e_info.value)
              == "Cannot json encode artifact before it has been logged or in offline mode."
          )
      run.finish()
  
imports: import json
  import os
  import pickle
  import sys
  import numpy
  import pytest
  import wandb
  from wandb import wandb_sdk
  from wandb.errors import UsageError
label_desc: Use image node_id 6 for calling a global function with example usage: test_unlogged_artifact_in_config(wandb_init, test_settings) without return types