code: def test_get_rev(tmp_dir, dvc, scm):
      scm.tag("myart@v1.0.0#1", annotated=True, message="foo")
      scm.tag("subdir=myart@v2.0.0#1", annotated=True, message="foo")
      scm.tag("myart#dev#1", annotated=True, message="foo")
      rev = scm.get_rev()
  
      assert dvc.artifacts.get_rev("myart") == rev
      assert dvc.artifacts.get_rev("myart", version="v1.0.0") == rev
      assert (
          dvc.artifacts.get_rev("subdir:myart", version="v2.0.0") == rev
      )
      assert (
          dvc.artifacts.get_rev(
              "subdir/dvc.yaml:myart", version="v2.0.0"
          )
          == rev
      )
      with pytest.raises(ArtifactNotFoundError):
          dvc.artifacts.get_rev("myart", version="v3.0.0")
      with pytest.raises(ArtifactNotFoundError):
          dvc.artifacts.get_rev("myart", stage="prod")
  
file_path: dvc/tests/func/artifacts/test_artifacts.py
imports: import logging
  import os
  from copy import deepcopy
  import pytest
  from dvc.annotations import Artifact
  from dvc.exceptions import ArtifactNotFoundError, InvalidArgumentError
  from dvc.repo.artifacts import check_name_format
  from dvc.utils.strictyaml import YAMLSyntaxError, YAMLValidationError
label_desc: Use image node_id 10 for calling a global function with example usage: test_get_rev(tmp_dir, dvc, scm) without return types