def uniqify_filename(filename):
    filelist = filename.rsplit('.', 1)
    filelist[0] = uuid4().hex
    return '.'.join(filelist)
Generate a unique filename that maintains the extension
dataset/ETHPy150Open ofa/connect/open_connect/connect_core/utils/storages.py/uniqify_filename