def _make_intermediate_dirs(sftp_client, remote_directory):
if remote_directory == '<STR_LIT:/>':<EOL><INDENT>sftp_client.chdir('<STR_LIT:/>')<EOL>return<EOL><DEDENT>if remote_directory == '<STR_LIT>':<EOL><INDENT>return<EOL><DEDENT>try:<EOL><INDENT>sftp_client.chdir(remote_directory)<EOL><DEDENT>except IOError:<EOL><INDENT>dirname, basename = os.path.split(remote_directory.rstrip('<STR_LIT:/>'))<EOL>_make_intermediate_dirs(sftp_client, dirname)<EOL>sftp_client.mkdir(basename)<EOL>sftp_client.chdir(basename)<EOL>return<EOL><DEDENT>
Create all the intermediate directories in a remote host

:param sftp_client: A Paramiko SFTP client.
:param remote_directory: Absolute Path of the directory containing the file
:return: