code: def test_list_artifacts_malicious_path(ftp_mock):
      artifact_root_path = "/experiment_id/run_id/"
      repo = FTPArtifactRepository(
          "ftp://test_ftp" + artifact_root_path
      )
      repo.get_ftp_client = MagicMock()
      call_mock = MagicMock(return_value=ftp_mock)
      repo.get_ftp_client.return_value = MagicMock(__enter__=call_mock)
      ftp_mock.nlst = MagicMock(return_value=[".", "/.", "/..", "//.."])
  
      artifacts = repo.list_artifacts(path=None)
      assert artifacts == []
  
imports: import ftplib
  import posixpath
  from ftplib import FTP
  from unittest.mock import MagicMock
  import pytest
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.ftp_artifact_repo import FTPArtifactRepository
label_desc: Use image node_id 5 for calling a global function with example usage: test_list_artifacts_malicious_path(ftp_mock) without return types