code: def test_list_artifacts(tmp_path, artifact_path):
      file_path = "file"
      dir_path = "model"
      tmp_path.joinpath(artifact_path or "").mkdir(
          parents=True, exist_ok=True
      )
      tmp_path.joinpath(artifact_path or "", file_path).write_text(
          "test"
      )
      tmp_path.joinpath(artifact_path or "", dir_path).mkdir()
  
      repo = SFTPArtifactRepository(f"sftp://{tmp_path}")
      artifacts = repo.list_artifacts(path=artifact_path)
      assert len(artifacts) == 2
      assert artifacts[0].path == posixpath.join(
          artifact_path or "", file_path
      )
      assert artifacts[0].is_dir is False
      assert artifacts[0].file_size == 4
      assert artifacts[1].path == posixpath.join(
          artifact_path or "", dir_path
      )
      assert artifacts[1].is_dir is True
      assert artifacts[1].file_size is None
  
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 3 for calling a global function with example usage: test_list_artifacts(tmp_path, artifact_path) without return types