def METHOD_NAME(dir):
    if need_exportdll:
        paths = os.environ["PATH"].split(os.pathsep)
        paths = list(set(paths))
        if dir in paths:
            paths.remove(dir)
        os.environ["PATH"] = os.pathsep.join(paths)