tfp.experimental.unnest.has_nested

Check if the object has a (nested) attribute.

obj The object to find (nested) attributes in.
attr A string attribute name to search for.
nested_lookup_fn A single-argument callable that returns a list of (attribute name, nested object) pairs. Defaults to get_nested_objs.

has_nested Boolean if the attribute was found or not.