def backup_dir(dir, ext='.bak'):
    n = 1
    extension = ext
    while os.path.exists(dir + extension):
        n += 1
        extension = ext + str(n)
    return dir + extension
Retrieve nicknames of the user
dataset/ETHPy150Open anzev/hedwig/build/pip/pip/utils/__init__.py/backup_dir--crossover with--dataset/ETHPy150Open bradfitz/addressbooker/gdata/apps/service.py/AppsService.RetrieveNicknames