def aggregate_flags(flags):
    on = any([flag is ON for flag in flags])
    off = any([flag is OFF for flag in flags])
    if on:
        if off:
            raise ValueError('ON and OFF flags cannot be mixed.')
        else:
            return ON
    else:
        return OFF if off else AUTO
Returns an aggregated flag given a sequence of flags.
dataset/ETHPy150Open pfnet/chainer/chainer/flag.py/aggregate_flags