def _check_startyear(cfgs):
    """
    Check to see that at most one startyear is defined in the config
    Returns
    -------
    int
        startyear

    Raises
    ------
    ValueError
        if more that one startyear is defined
    """
    first_startyear = cfgs[0].pop("startyear", 1750)
    if len(cfgs) > 1:
        for cfg in cfgs[1:]:
            this_startyear = cfg.pop("startyear", 1750)
            if this_startyear != first_startyear:
                raise ValueError("Can only handle one startyear per scenario ensemble")

    return first_startyear