def i_groupAttribute(ss: Substrate, att: attribute) -> sctIdGroups_or_Error:
    att_sctids = i_attributeOperator(ss, att.attrOper, ss.i_attributeName(att.name))
    if att_sctids.inran('error'):
        return sctIdGroups_or_Error(gerror=att_sctids.error)
    elif att.opValue.inran('attrib_expr'):
        expr_interp = i_expressionComparisonOperator(ss, att.rf, result_sctids(att_sctids), att.opValue.attrib_expr)
        return i_att_group_cardinality(ss, att.card, expr_interp)
    elif att.opValue.inran('attrib_num'):
        num_interp = i_numericComparsionOperator(ss, att.rf, result_sctids(att_sctids), att.opValue.attrib_num)
        return i_att_group_cardinality(ss, att.card, num_interp)
    else:
        str_interp = i_stringComparisonOperator(ss, att.rf, result_sctids(att_sctids), att.opValue.attrib_str)
        return i_att_group_cardinality(ss, att.card, str_interp)
def i_attribute(ss: Substrate, att: attribute) -> Sctids_or_Error:
    att_sctids = i_attributeOperator(ss, att.attrOper, ss.i_attributeName(att.name))
    return att_sctids if att_sctids.inran('error') else \
        i_att_cardinality(ss, att.card, i_expressionComparisonOperator(ss,
                                                                       att.rf,
                                                                       result_sctids(att_sctids),
                                                                       att.opValue.attrib_expr)) if \
            att.opValue.inran('attrib_expr') else \
        i_att_cardinality(ss, att.card, i_numericComparsionOperator(ss,
                                                                    att.rf,
                                                                    result_sctids(att_sctids),
                                                                    att.opValue.attrib_num)) if \
            att.opValue.inran('attrib_num') else \
        i_att_cardinality(ss, att.card, i_stringComparisonOperator(ss,
                                                                   att.rf,
                                                                   result_sctids(att_sctids),
                                                                   att.opValue.attrib_str))