def create_directory(dirname, attempt=0):
    if (not os.path.isdir(dirname)):
        parent = os.path.abspath((dirname + '/..'))
        content = glob.glob((parent + '/*'))
        if (not (dirname in content)):
            os.makedirs(dirname)
            if (attempt == 2):
                print(f'{dirname}: moved to trash')
        else:
            if (attempt == 1):
                print("{dirname}: fusermount didn't work")
                command = f'mv -f {parent} {dirtrash}'
                os.system(command)
                create_directory(dirname, attempt=2)
            if (attempt == 2):
                print(f'{dirname}: really serious problem')
                abort()
            else:
                print(f'{dirname}: problem with the fuse system')
                command = f'fusermount -u {dirname}'
                os.system(command)
                create_directory(dirname, attempt=1)
def create_directory(dirname, attempt=0):
    if (not os.path.isdir(dirname)):
        parent = os.path.abspath((dirname + '/..'))
        content = glob.glob((parent + '/*'))
        if (not (dirname in content)):
            os.makedirs(dirname)
            if (attempt == 2):
                print(f'{dirname}: moved to trash')
        else:
            if (attempt == 1):
                print("{dirname}: fusermount didn't work")
                command = f'mv -f {parent} {dirtrash}'
                os.system(command)
                create_directory(dirname, attempt=2)
            if (attempt == 2):
                print(f'{dirname}: really serious problem')
                abort()
            else:
                print(f'{dirname}: problem with the fuse system')
                command = f'fusermount -u {dirname}'
                os.system(command)
                create_directory(dirname, attempt=1)