def get_generic_constraint_rhs(data, intervention) -> dict:
    """
    Get generic constraint right-hand-side term

    Parameters
    ----------
    data : dict
        NEMDE case file dictionary

    intervention : str
        Intervention flag - '0' -> no intervention constraints, '1' -> intervention constraints included

    Returns
    -------
    rhs : dict
        Dictionary with keys = ConstraintIDs, values = constraint RHS
    """

    constraints = (data.get('NEMSPDCaseFile').get('NemSpdOutputs')
                   .get('ConstraintSolution'))

    # Container for constraint RHS terms
    rhs = {}
    for i in constraints:
        # Check intervention flag
        if i['@Intervention'] == intervention:
            rhs[i['@ConstraintID']] = float(i['@RHS'])

    return rhs