original_docstring: 
              Download an artifact file or directory to a local directory/file if applicable, and
              return a local path for it.
              The caller is responsible for managing the lifecycle of the downloaded artifacts.
  
              (self.path contains the base path - hdfs:/some/path/run_id/artifacts)
  
              :param artifact_path: Relative source path to the desired artifacts file or directory.
              :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 be downloaded to a new,
                               uniquely-named
                               directory on the local filesystem.
  
              :return: Absolute path of the local filesystem location containing the downloaded
              artifacts - file/directory.
          
docstring: Download an artifact file or directory to a local directory/file if applicable, and
  return a local path for it.
  The caller is responsible for managing the lifecycle of the downloaded artifacts.
  
  (self.path contains the base path - hdfs:/some/path/run_id/artifacts)
docstring_tokens: Download an artifact file or directory to a local directory / file if applicable and return a local path for it . The caller is responsible for managing the lifecycle of the downloaded artifacts . ( self . path contains the base path - hdfs : / some / path / run_id / artifacts )
code: def download_artifacts(self, artifact_path, dst_path=None):
          """
              Download an artifact file or directory to a local directory/file if applicable, and
              return a local path for it.
              The caller is responsible for managing the lifecycle of the downloaded artifacts.
  
              (self.path contains the base path - hdfs:/some/path/run_id/artifacts)
  
              :param artifact_path: Relative source path to the desired artifacts file or directory.
              :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 be downloaded to a new,
                               uniquely-named
                               directory on the local filesystem.
  
              :return: Absolute path of the local filesystem location containing the downloaded
              artifacts - file/directory.
          """
  
          hdfs_base_path = _resolve_base_path(self.path, artifact_path)
          local_dir = _tmp_dir(dst_path)
  
          with hdfs_system(host=self.host, port=self.port) as hdfs:
  
              if not hdfs.isdir(hdfs_base_path):
                  local_path = self._join(local_dir, artifact_path)
                  _download_hdfs_file(hdfs, hdfs_base_path, local_path)
                  return local_path
  
              for path, is_dir, _ in self._walk_path(hdfs, hdfs_base_path):
  
                  relative_path = _relative_path(hdfs_base_path, path)
                  local_path = self._join(local_dir, relative_path) \
                      if relative_path else local_dir
  
                  if is_dir:
                      mkdir(local_path)
                  else:
                      _download_hdfs_file(hdfs, path, local_path)
              return local_dir
code_tokens: def download_artifacts ( self , artifact_path , dst_path = None ) : hdfs_base_path = _resolve_base_path ( self . path , artifact_path ) local_dir = _tmp_dir ( dst_path ) with hdfs_system ( host = self . host , port = self . port ) as hdfs : if not hdfs . isdir ( hdfs_base_path ) : local_path = self . _join ( local_dir , artifact_path ) _download_hdfs_file ( hdfs , hdfs_base_path , local_path ) return local_path for path , is_dir , _ in self . _walk_path ( hdfs , hdfs_base_path ) : relative_path = _relative_path ( hdfs_base_path , path ) local_path = self . _join ( local_dir , relative_path ) if relative_path else local_dir if is_dir : mkdir ( local_path ) else : _download_hdfs_file ( hdfs , path , local_path ) return local_dir
short_docstring: Download an artifact file or directory to a local directory/file if applicable, and
  return a local path for it.
short_docstring_tokens: Download an artifact file or directory to a local directory / file if applicable and return a local path for it .
comment: """
              Download an artifact file or directory to a local directory/file if applicable, and
              return a local path for it.
              The caller is responsible for managing the lifecycle of the downloaded artifacts.
  
              (self.path contains the base path - hdfs:/some/path/run_id/artifacts)
  
              :param artifact_path: Relative source path to the desired artifacts file or directory.
              :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 be downloaded to a new,
                               uniquely-named
                               directory on the local filesystem.
  
              :return: Absolute path of the local filesystem location containing the downloaded
              artifacts - file/directory.
          """