optiprofiler.legacy_compat.import_legacy_feature

optiprofiler.legacy_compat.import_legacy_feature#

optiprofiler.legacy_compat.import_legacy_feature(container)[source]#

Convert a decoded historical Feature container into a canonical Feature and the run count it retained.

Stage-local options are validated by the 2.0 definitions; the root run count of a composite wins over any residue stored in its child stages; a recorded declaration is restored, and nothing is guessed for a declaration the object did not record. Raises LegacyConfigurationError when the historical options are not a valid 2.0 specification and TypeError for anything that is not a legacy container.