class_docstr: Handles artifacts associated with a model version in the model registry via URIs of the form:
    - `models:/<model_name>/<model_version>`
    - `models:/<model_name>/<stage>`  (refers to the latest model version in the given stage)
    - `models:/<model_name>/latest` (refers to the latest of all model versions)
  It is a light wrapper that resolves the artifact path to an absolute URI then instantiates
  and uses the artifact repository for that URI.
docstr: Download an artifact file or directory to a local directory if applicable, and return a
  local path for it.
  For registered models, when the artifact is downloaded, the model name and version
  are saved in the "registered_model_meta" file on the caller's side.
  The caller is responsible for managing the lifecycle of the downloaded artifacts.
  
  :param artifact_path: Relative source path to the desired artifacts.
  :param dst_path: Absolute path of the local filesystem destination directory to which to
                   download the specified artifacts. This directory must already exist.
                   If unspecified, the artifacts will either be downloaded to a new
                   uniquely-named directory on the local filesystem or will be returned
                   directly in the case of the LocalArtifactRepository.
  
  :return: Absolute path of the local filesystem location containing the desired artifacts.
docstr_tok: ["Download","an","artifact","file","or","directory","to","a","local","directory","if","applicable",",","and","return","a","local","path","for","it",".","For","registered","models",",","when","the","artifact","is","downloaded",",","the","model","name","and","version","are","saved","in","the","``","registered_model_meta","''","file","on","the","caller","'s","side",".","The","caller","is","responsible","for","managing","the","lifecycle","of","the","downloaded","artifacts",".",":","param","artifact_path",":","Relative","source","path","to","the","desired","artifacts",".",":","param","dst_path",":","Absolute","path","of","the","local","filesystem","destination","directory","to","which","to","download","the","specified","artifacts",".","This","directory","must","already","exist",".","If","unspecified",",","the","artifacts","will","either","be","downloaded","to","a","new","uniquely-named","directory","on","the","local","filesystem","or","will","be","returned","directly","in","the","case","of","the","LocalArtifactRepository",".",":","return",":","Absolute","path","of","the","local","filesystem","location","containing","the","desired","artifacts","."]
code: def download_artifacts(self, artifact_path, dst_path=None):
      """
      Download an artifact file or directory to a local directory if applicable, and return a
      local path for it.
      For registered models, when the artifact is downloaded, the model name and version
      are saved in the "registered_model_meta" file on the caller's side.
      The caller is responsible for managing the lifecycle of the downloaded artifacts.
  
      :param artifact_path: Relative source path to the desired artifacts.
      :param dst_path: Absolute path of the local filesystem destination directory to which to
                       download the specified artifacts. This directory must already exist.
                       If unspecified, the artifacts will either be downloaded to a new
                       uniquely-named directory on the local filesystem or will be returned
                       directly in the case of the LocalArtifactRepository.
  
      :return: Absolute path of the local filesystem location containing the desired artifacts.
      """
  
      from mlflow.models.model import MLMODEL_FILE_NAME
  
      model_path = self.repo.download_artifacts(artifact_path, dst_path)
      # NB: only add the registered model metadata iff the artifact path is at the root model
      # directory. For individual files or subdirectories within the model directory, do not
      # create the metadata file.
      if os.path.isdir(model_path) and MLMODEL_FILE_NAME in os.listdir(
          model_path
      ):
          self._add_registered_model_meta_file(model_path)
  
      return model_path
  
imports: import logging
  import os
  import urllib.parse
  import mlflow
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository
  from mlflow.store.artifact.databricks_models_artifact_repo import DatabricksModelsArtifactRepository
  from mlflow.store.artifact.unity_catalog_models_artifact_repo import UnityCatalogModelsArtifactRepository
  from mlflow.store.artifact.utils.models import get_model_name_and_version, is_using_databricks_registry
  from mlflow.utils.file_utils import write_yaml
  from mlflow.utils.uri import add_databricks_profile_info_to_artifact_uri, get_databricks_profile_uri_from_artifact_uri, is_databricks_unity_catalog_uri
label_desc: Use image node_id 10 for calling the ModelsArtifactRepository obj's underlying member method code with example usage: obj.download_artifacts(artifact_path, dst_path) and returns: model_path