def METHOD_NAME(attr, dims, attr_name, cond='equal'):
    if not compare_value(attr[dims[0]], attr[dims[1]], cond):
        expect_info = 'Support {}[{}] {} {}[{}], '.format(
            attr_name, dims[0], cond, attr_name, dims[1])
        actual_info = 'actually got {}[{}]=={}, not {} {}[{}]=={}.'.format(
            attr_name, dims[0], attr[dims[0]], cond, attr_name, dims[1],
            attr[dims[1]])
        raise ValueError(expect_info + actual_info)