code: def test_log_artifact(artifact_path):
      file_content = (
          "A simple test artifact\nThe artifact is located in: "
          + str(artifact_path)
      )
      with NamedTemporaryFile(mode="w") as local, TempDir() as remote:
          local.write(file_content)
          local.flush()
  
          sftp_path = "sftp://" + remote.path()
          store = SFTPArtifactRepository(sftp_path)
          store.log_artifact(local.name, artifact_path)
  
          remote_file = posixpath.join(
              remote.path(),
              "." if artifact_path is None else artifact_path,
              os.path.basename(local.name),
          )
          assert posixpath.isfile(remote_file)
  
          with open(remote_file) as remote_content:
              assert remote_content.read() == file_content
  
file_path: mlflow/tests/store/artifact/test_sftp_artifact_repo.py
imports: import os
  import posixpath
  from tempfile import NamedTemporaryFile
  import pytest
  import mlflow
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.sftp_artifact_repo import SFTPArtifactRepository
  from mlflow.utils.file_utils import TempDir
label_desc: Use image node_id 4 for calling a global function with example usage: test_log_artifact(artifact_path) without return types