<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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