code: def test_validates_metadata_ok(
      self, create_artifact: Callable[..., wandb.Artifact]
  ):
      assert create_artifact(metadata=None).metadata == {}
      assert create_artifact(metadata={"foo": "bar"}).metadata == {
          "foo": "bar"
      }
      assert create_artifact(
          metadata={"foo": {"bar": [1, 2, (3, None)]}}
      ).metadata == {"foo": {"bar": [1, 2, [3, None]]}}
      assert create_artifact(
          metadata={"foo": np.arange(3)}
      ).metadata == {"foo": [0, 1, 2]}
      assert create_artifact(
          metadata={"foo": slice(4, 9, 2)}
      ).metadata == {
          "foo": {"slice_start": 4, "slice_stop": 9, "slice_step": 2}
      }
  
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 1 for calling the TestArtifactChecksMetadata obj's underlying member method code with example usage: obj.test_validates_metadata_ok(create_artifact) without return types