def normalize_excludes(rootpath, excludes):
    sep = os.path.sep
    f_excludes = []
    for exclude in excludes:
        if not os.path.isabs(exclude) and not exclude.startswith(rootpath):
            exclude = os.path.join(rootpath, exclude)
        if not exclude.endswith(sep):
            exclude += sep
        f_excludes.append(exclude)
    return f_excludes
Normalize the excluded directory list:
dataset/ETHPy150Open Netflix/security_monkey/generate_docs.py/normalize_excludes