_get_attributes_dict formalization
Index subclasses have a `_get_attributes_dict` method that would be useful to employ elsewhere (here I'm thinking of DateOffset subclasses and discussion in #19174).  Could/should that be defined in a Mixin class (say in core.base) so that pattern could be documented and used elsewhere?