@convert_paramiko_errors
    def makedirs(self, dir_path):
        sftp = self.get_sftp()
        create_dirs = []
        while 1:
            try:
                sftp.stat(dir_path)
                break # dir exists
            except (paramiko.SSHException, __HOLE__):
                create_dirs.insert(0, dir_path)
                dir_path, rest = os.path.split(dir_path)
                if not dir_path or not rest:
                    break

        for dir_path in create_dirs:
            sftp.mkdir(dir_path)
dataset/ETHPy150Open ohmu/poni/poni/rcontrol_paramiko.py/ParamikoRemoteControl.makedirs