code: def test_artifact_creation_with_diff_type(user, cleanup):
      artifact_name = f"a1-{str(time.time())}"
  
      # create
      with wandb.init() as run:
          artifact = wandb.Artifact(artifact_name, "artifact_type_1")
          artifact.add(
              wandb.Image(np.random.randint(0, 255, (10, 10))), "image"
          )
          run.log_artifact(artifact)
  
      # update
      with wandb.init() as run:
          artifact = wandb.Artifact(artifact_name, "artifact_type_1")
          artifact.add(
              wandb.Image(np.random.randint(0, 255, (10, 10))), "image"
          )
          run.log_artifact(artifact)
  
      # invalid
      with wandb.init() as run:
          artifact = wandb.Artifact(artifact_name, "artifact_type_2")
          artifact.add(
              wandb.Image(np.random.randint(0, 255, (10, 10))),
              "image_2",
          )
          did_err = False
          try:
              run.log_artifact(artifact)
          except ValueError as err:
              did_err = True
              assert (
                  str(err)
                  == f"Artifact {artifact_name} already exists with type 'artifact_type_1';"
                  " cannot create another with type 'artifact_type_2'"
              )
          assert did_err
  
      with wandb.init() as run:
          artifact = run.use_artifact(artifact_name + ":latest")
          # should work
          image = artifact.get("image")
          assert image is not None
          # should not work
          image_2 = artifact.get("image_2")
          assert image_2 is None
  
file_path: wandb/tests/pytest_tests/system_tests/test_artifacts/test_misc.py
imports: import os
  import shutil
  import time
  import numpy
  import pytest
  import wandb
label_desc: Use image node_id 6 for calling a global function with example usage: test_artifact_creation_with_diff_type(user, cleanup) without return types