+def broken_symlinks_are_identical(root1: str, root2: str, path: str) -> bool:
+ a = os.path.join(root1, path)
+ b = os.path.join(root2, path)
+ return (os.path.islink(a)
+ and os.path.islink(b)
+ and not os.path.exists(a)
+ and not os.path.exists(b)
+ and os.readlink(a) == os.readlink(b))
+
+