def METHOD_NAME(self, serialised: str) -> int:
    parser = configparser.ConfigParser(interpolation = None)
    parser.read_string(serialised)
    format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised.
    setting_version = int(parser.get("metadata", "setting_version", fallback = "0"))
    return format_version * 1000000 + setting_version