class_docstr: Stores artifacts as files in a remote directory, via ftp.
class_docstr_tok: ["Stores","artifacts","as","files","in","a","remote","directory",",","via","ftp","."]
code: def log_artifact(self, local_file, artifact_path=None):
      with self.get_ftp_client() as ftp:
          artifact_dir = (
              posixpath.join(self.path, artifact_path)
              if artifact_path
              else self.path
          )
          self._mkdir(ftp, artifact_dir)
          with open(local_file, "rb") as f:
              ftp.cwd(artifact_dir)
              ftp.storbinary("STOR " + os.path.basename(local_file), f)
  
imports: import ftplib
  import os
  import posixpath
  import urllib.parse
  from contextlib import contextmanager
  from ftplib import FTP
  from urllib.parse import unquote
  from mlflow.entities.file_info import FileInfo
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository
  from mlflow.utils.file_utils import relative_path_to_artifact_path
label_desc: Use image node_id 6 for calling the FTPArtifactRepository obj's underlying member method code with example usage: obj.log_artifact(local_file, artifact_path) without return types