def METHOD_NAME(pathnames, root=None):
    if not isinstance(pathnames, list):
        pathnames = [pathnames]
    result = set()
    for pathname in pathnames:
        result |= set(
            METHOD_NAME.METHOD_NAME(
                os.path.join(root, pathname) if root else pathname, recursive=True
            )
        )
    return list(result)