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 _mkdir(ftp, artifact_dir):
      try:
          if not FTPArtifactRepository._is_dir(ftp, artifact_dir):
              ftp.mkd(artifact_dir)
      except ftplib.error_perm:
          head, _ = posixpath.split(artifact_dir)
          FTPArtifactRepository._mkdir(ftp, head)
          FTPArtifactRepository._mkdir(ftp, artifact_dir)
  
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 4 for calling the FTPArtifactRepository obj's underlying member method code with example usage: obj._mkdir(ftp, artifact_dir) without return types