code: def test_run_log_artifact(wandb_init):
      # Prepare data.
      with wandb_init() as run:
          pass
      run = wandb.Api().run(run.path)
  
      artifact = wandb.Artifact("my_artifact", type="test")
      artifact.save()
      artifact.wait()
  
      # Run.
      run.log_artifact(artifact)
  
      # Assert.
      actual_artifacts = list(run.logged_artifacts())
      assert len(actual_artifacts) == 1
      assert (
          actual_artifacts[0].qualified_name == artifact.qualified_name
      )
  
file_path: wandb/tests/pytest_tests/system_tests/test_artifacts/test_public_api.py
imports: import os
  import pytest
  import wandb
  from wandb import Api
label_desc: Use image node_id 7 for calling a global function with example usage: test_run_log_artifact(wandb_init) without return types