tfp.experimental.lazybones.utils.get_roots

Returns all parentless ancestors ("roots") of (iterable) descendants.