def load_default_configuration_num(workspace_root: Path) -> int:
    env_index = os.environ.get('REMOTE_HOST_INDEX')
    if env_index:
        try:
            return int(env_index)
        except ValueError:
            raise ConfigurationError(f"REMOTE_HOST_INDEX env variable contains symbols other than numbers: '{env_index}'. Please set the coorect index value to continue")
    index_file = (workspace_root / INDEX_FILE_NAME)
    if (not index_file.exists()):
        return 0
    text = index_file.read_text().strip()
    try:
        return (int(text) - 1)
    except ValueError:
        raise ConfigurationError(f"File {index_file} contains symbols other than numbers: '{text}'. Please remove it or replace the value to continue")
def load_default_configuration_num(workspace_root: Path) -> int:
    env_index = os.environ.get('REMOTE_HOST_INDEX')
    if env_index:
        try:
            return int(env_index)
        except ValueError:
            raise ConfigurationError(f"REMOTE_HOST_INDEX env variable contains symbols other than numbers: '{env_index}'. Please set the coorect index value to continue")
    index_file = (workspace_root / INDEX_FILE_NAME)
    if (not index_file.exists()):
        return 0
    text = index_file.read_text().strip()
    try:
        return (int(text) - 1)
    except ValueError:
        raise ConfigurationError(f"File {index_file} contains symbols other than numbers: '{text}'. Please remove it or replace the value to continue")