def METHOD_NAME(
    caplog,
    blocks: List[Tuple[int, int]],
    level: Optional[int],
    expected_subtables: int,
    expected_bytes: int,
):
    """Check that the optimizations are off by default, and that increasing
    the optimization level creates more subtables and a smaller byte size.
    """
    caplog.set_level(logging.DEBUG)
    glyphs, features = get_kerning_by_blocks(blocks)
    glyphs = [".notdef space"] + glyphs
    fb = FontBuilder(1000)
    if level is not None:
        fb.font.cfg["fontTools.otlLib.optimize.gpos:COMPRESSION_LEVEL"] = level
    fb.setupGlyphOrder(glyphs)
    addOpenTypeFeaturesFromString(fb.font, features)
    assert expected_subtables == count_pairpos_subtables(fb.font)
    assert expected_bytes == count_pairpos_bytes(fb.font)