code: def test_artifact_uploader_upload_artifact(
      tempdir, artifact_uploader
  ):
      path = os.path.join(tempdir, "exists")
      with open(path, "a") as f:
          f.write("boo")
  
      name = resolve_artifact_name(path)
      artifact_uploader._s3_client.head_object.return_value = {
          "ETag": "etag_value"
      }
  
      s3_uri, etag = artifact_uploader.upload_artifact(path)
      expected_key = "{}/{}/{}".format(
          artifact_uploader.artifact_prefix,
          artifact_uploader.trial_component_name,
          name,
      )
  
      artifact_uploader._s3_client.upload_file.assert_called_with(
          path,
          artifact_uploader.artifact_bucket,
          expected_key,
          ExtraArgs=None,
      )
  
      expected_uri = "s3://{}/{}".format(
          artifact_uploader.artifact_bucket, expected_key
      )
      assert expected_uri == s3_uri
  
imports: from __future__ import absolute_import
  import json
  import os
  import shutil
  import tempfile
  from mock import Mock, PropertyMock, call
  import pytest
  from src.sagemaker.experiments._helper import _LineageArtifactTracker, _ArtifactUploader
  from src.sagemaker.experiments._utils import resolve_artifact_name
  from src.sagemaker.session import Session
  from tests.unit import _test_default_bucket_and_prefix_combinations, DEFAULT_S3_OBJECT_KEY_PREFIX_NAME, DEFAULT_S3_BUCKET_NAME
label_desc: Use image node_id 10 for calling a global function with example usage: test_artifact_uploader_upload_artifact(tempdir, artifact_uploader) without return types