tfp.experimental.unnest.UnnestingWrapper

For when you want to get (nested) fields by usual attribute access.

Example usage:

results = ...
wrapped = UnnestingWrapper(results)
wrapped.my_attr  # equivalent to `get_innermost(results, 'my_attr')

# Use `_object` to get at the wrapped object.
new_results = replace_innermost(wrapped._object, ...)

obj The object to find nested objects in.
innermost Boolean. When True, attribute access uses get_innermost; otherwise uses get_outermost. Defaults to True.