def METHOD_NAME(lhs: t.Any, rhs: t.Any) -> int:
    m = 0
    for o in orders:
        m = cmp(
            get_field(lhs, o.field),  # type:ignore[arg-type]
            get_field(rhs, o.field),  # type:ignore[arg-type]
        )
        m = o.reverse and -m or m
        if m != 0:
            return m
    return m