def METHOD_NAME(fp32_model, dummy_input, quant_scheme, data_loader):
    model = quantsim_model(fp32_model, dummy_input, quant_scheme)
    def quantize_input(data):
        input_quantizer = model._bn.input_quantizers[0]
        if isinstance(input_quantizer, StaticGridTensorQuantizer):
            return input_quantizer.quantize_dequantize(data, input_quantizer.round_mode)
        assert isinstance(input_quantizer, LearnedGridTensorQuantizer)
        encoding = input_quantizer.encoding
        encoding_min = torch.tensor([encoding.min])
        encoding_max = torch.tensor([encoding.max])
        return input_quantizer.quantize_dequantize(data, encoding_min, encoding_max)
    expected_mean = [torch.mean(quantize_input(data), dim=(0,2,3)) for data in data_loader]
    expected_mean = sum(expected_mean) / len(data_loader)
    expected_var = [torch.var(quantize_input(data), dim=(0,2,3)) for data in data_loader]
    expected_var = sum(expected_var) / len(data_loader)
    def update_encoding_stats(*args, **kwargs):
        raise AssertionError("Expected `update_encoding_stats` not to be called "
                             "during batchnorm re-esimtation.")
    # `update_encoding_stats` should not be called except for batchnorm quant wrappers
    for module in model.modules():
        if not isinstance(module, StaticGridQuantWrapper):
            continue
        if isinstance(module._module_to_wrap, _BatchNorm):
            continue
        for quantizer in module.param_quantizers.values():
            patch.object(quantizer, "update_encoding_stats", wraps=update_encoding_stats).__enter__()
    _test_reestimation(model, data_loader, expected_mean, expected_var)