def METHOD_NAME(model_lambda, static):
    model = model_lambda()
    model_path = make_tmp_onnx_file(model)
    calibrate_op_types = ["Conv", "MatMul"]
    calibrator = CalibrationSession(
        model_path, calibrate_op_types=calibrate_op_types, static=static
    )
    # Test Augmented Graph
    calibrator.model_augmented
    aug_model_nodes = [n.name for n in calibrator.model_augmented.graph.node]
    for node in calibrator.model.graph.node:
        if node.op_type in calibrate_op_types:
            min_op_name = "{}_ReduceMin".format(node.name)
            max_op_name = "{}_ReduceMax".format(node.name)
            assert min_op_name in aug_model_nodes
            assert max_op_name in aug_model_nodes
    # Check that inputs are processed in static mode
    if static:
        for inp in calibrator.model.graph.input:
            min_op_name = "{}_ReduceMin".format(inp.name)
            max_op_name = "{}_ReduceMax".format(inp.name)
            assert min_op_name in aug_model_nodes
            assert max_op_name in aug_model_nodes
    # Clean up
    os.remove(model_path)