def METHOD_NAME(problem):
    n, blob = problem
    try:
        d = ConjectureData.for_buffer(blob)
        k = d.draw(st.integers())
        stop = blob[len(d.buffer)]
    except (StopTest, IndexError):
        reject()
    assume(k > n)
    assume(stop > 0)
    def f(data):
        k = data.draw(st.integers())
        data.output = repr(k)
        if data.draw_bits(8) == stop and k >= n:
            data.mark_interesting()
    runner = ConjectureRunner(
        f,
        random=Random(0),
        settings=settings(
            suppress_health_check=list(HealthCheck),
            phases=(Phase.shrink,),
            database=None,
            verbosity=Verbosity.debug,
        ),
        database_key=None,
    )
    runner.cached_test_function(blob)
    assert runner.interesting_examples
    (v,) = runner.interesting_examples.values()
    shrinker = runner.new_shrinker(v, lambda x: x.status == Status.INTERESTING)
    shrinker.fixate_shrink_passes(["minimize_individual_blocks"])
    v = shrinker.shrink_target
    m = ConjectureData.for_buffer(v.buffer).draw(st.integers())
    assert m == n
    # Upper bound on the length needed is calculated as follows:
    # * We have an initial byte at the beginning to decide the length of the
    #   integer.
    # * We have a terminal byte as the stop value.
    # * The rest is the integer payload. This should be n. Including the sign
    #   bit, n needs (1 + n.bit_length()) / 8 bytes (rounded up). But we only
    #   have power of two sizes, so it may be up to a factor of two more than
    #   that.
    bits_needed = 1 + n.bit_length()
    actual_bits_needed = min(s for s in INT_SIZES if s >= bits_needed)
    bytes_needed = actual_bits_needed // 8
    # 3 extra bytes: two for the sampler, one for the capping value.
    assert len(v.buffer) == 3 + bytes_needed