def version(self) -> int:
        """Return the scenario's version.

        If this is not present, we default to version 1.

        :raises InvalidScenarioVersion:
            if the supplied version is not present in :var:`SUPPORTED_SCENARIO_VERSIONS`.
        """
        version = self._config.get('version', 1)

        if version not in SUPPORTED_SCENARIO_VERSIONS:
            raise InvalidScenarioVersion(f'Unexpected scenario version {version}')
        return version
def version ( self ) -> int : version = self . _config . get ( 'version' , 1 ) if version not in SUPPORTED_SCENARIO_VERSIONS : raise InvalidScenarioVersion ( f'Unexpected scenario version {version}' ) return version
Return the scenario's version.

        If this is not present, we default to version 1.

        :raises InvalidScenarioVersion:
            if the supplied version is not present in :var:`SUPPORTED_SCENARIO_VERSIONS`.