def METHOD_NAME(ioTuneParamsInfo):
    categories = ("bytes", "iops")
    for category in categories:
        if ioTuneParamsInfo.get('total_' + category + '_sec', 0) and \
                (ioTuneParamsInfo.get('read_' + category + '_sec', 0) or
                 ioTuneParamsInfo.get('write_' + category + '_sec', 0)):
            raise ValueError('A non-zero total value and non-zero'
                             ' read/write value for %s_sec can not be'
                             ' set at the same time' % category)