code: def _create_artifact_and_set_metadata(metadata):
      artifact = wandb.Artifact("foo", "dataset")
      artifact.metadata = metadata
      return artifact
  
file_path: wandb/tests/pytest_tests/system_tests/test_artifacts/test_misc2.py
imports: from typing import Callable
  import numpy
  import pytest
  import wandb
  from wandb.sdk.artifacts.exceptions import ArtifactNotLoggedError
  from wandb.testing.relay import TokenizedCircularPattern
label_desc: Use image node_id 6 for calling a global function with example usage: _create_artifact_and_set_metadata(metadata) and returns: artifact