def METHOD_NAME(paths):
    paths.sort()
    basenames = [os.path.basename(p) for p in paths]
    for prio in PRIORITIZE[::-1]:
        try:
            i = basenames.index(prio)
        except ValueError:
            pass
        else:
            basenames.insert(0, basenames.pop(i))
            paths.insert(0, paths.pop(i))