def identify_degenerate_nests(nest_spec):
    """
    Identify the nests within nest_spec that are degenerate, i.e. those nests
    with only a single alternative within the nest.

    Parameters
    ----------
    nest_spec : OrderedDict.
        Keys are strings that define the name of the nests. Values are lists
        of alternative ids, denoting which alternatives belong to which nests.
        Each alternative id must only be associated with a single nest!

    Returns
    -------
    list.
        Will contain the positions in the list of keys from `nest_spec` that
        are degenerate.
    """
    degenerate_positions = []
    for pos, key in enumerate(nest_spec):
        if len(nest_spec[key]) == 1:
            degenerate_positions.append(pos)
    return degenerate_positions