Extract _add_attrs_to_inner_type