def METHOD_NAME(root, filename):
    if os.path.sep + "Cython" + os.path.sep in root:
        return False
    if (
        root.endswith(os.path.sep + "matplotlib")
        or os.path.sep + "matplotlib" + os.path.sep in root
    ):
        return False
    if filename.endswith("linux-gnu_d.so"):
        return False
    if root.endswith(os.path.sep + "msgpack"):
        return False
    first_part = filename.split(".")[0]
    if first_part in done:
        return False
    done.add(first_part)
    return filename.endswith((".so", ".pyd")) and not filename.startswith(
        "libpython"
    )