code: def test_artifact_checkout(user, api, sample_data):
      # Create a file that should be removed as part of checkout
      os.makedirs(os.path.join(".", "artifacts", "mnist"))
      with open(
          os.path.join(".", "artifacts", "mnist", "bogus"), "w"
      ) as f:
          f.write("delete me, i'm a bogus file")
  
      art = api.artifact("mnist:v0", type="dataset")
      path = art.checkout()
      assert path == os.path.abspath(
          os.path.join(".", "artifacts", "mnist")
      )
      assert os.listdir(path) == ["digits.h5"]
  
imports: import os
  import platform
  import pytest
  import wandb
  from wandb.sdk.artifacts.exceptions import ArtifactFinalizedError
label_desc: Use image node_id 11 for calling a global function with example usage: test_artifact_checkout(user, api, sample_data) without return types