def METHOD_NAME(self):
    global FILE
    FILE = StringIO()
    cnt = torch._dynamo.testing.CompileCounter()
    def g(x):
        @comptime
        def _(ctx):
            ctx.print_value_stack(file=FILE, stacklevel=1)
        return x
    @torch._dynamo.optimize(cnt)
    def f(x):
        y = x + g(x)
        return y + comptime.print_value_stack_and_return(y * 2)
    f(torch.randn(2))
    self.assertEqual(cnt.frame_count, 1)
    self.assertExpectedInline(
        FILE.getvalue(),
        """\