tf_agents.utils.nest_utils.flatten_and_check_shape_nested_specs

Flatten nested specs and check their shape for use in other functions.