def _test_qat_applied(modifier, model):
    if ((not modifier.submodules) or (modifier.submodules == [''])):
        assert (hasattr(model, 'qconfig') and (model.qconfig is not None))
        submodules = ['']
        for module in model.modules():
            if _is_quantiable_module(module):
                assert (hasattr(module, 'qconfig') and (module.qconfig == model.qconfig))
    else:
        assert ((not hasattr(model, 'qconfig')) or (model.qconfig is None))
        submodules = modifier.submodules
    for (name, module) in model.named_modules():
        if (_is_valid_submodule(name, submodules) and _is_quantiable_module(module)):
            assert (hasattr(module, 'qconfig') and (module.qconfig is not None))
def _test_qat_applied(modifier, model):
    if ((not modifier.submodules) or (modifier.submodules == [])):
        assert (hasattr(model, 'qconfig') and (model.qconfig is not None))
        submodules = []
        for module in model.modules():
            if _is_quantiable_module(module):
                assert (hasattr(module, 'qconfig') and (module.qconfig == model.qconfig))
    else:
        assert ((not hasattr(model, 'qconfig')) or (model.qconfig is None))
        submodules = modifier.submodules
    for (name, module) in model.named_modules():
        if (_is_valid_submodule(name, submodules) and _is_quantiable_module(module)):
            assert (hasattr(module, 'qconfig') and (module.qconfig is not None))