def METHOD_NAME(self):
    def fn(a, b):
        tmp = BaseModelOutput(last_hidden_state=b + 3)
        tmp.hidden_states = a + 7
        tmp["attentions"] = a + b + 6
        return tmp
    args = [torch.randn(10), torch.randn(10)]
    obj1 = fn(*args)
    cnts = torch._dynamo.testing.CompileCounter()
    opt_fn = torch._dynamo.optimize_assert(cnts)(fn)
    obj2 = opt_fn(*args)
    self.assertTrue(same(obj1.last_hidden_state, obj2.last_hidden_state))
    self.assertTrue(same(obj1.hidden_states, obj2.hidden_states))
    self.assertTrue(same(obj1.attentions, obj2.attentions))
    self.assertEqual(cnts.frame_count, 1)
    self.assertEqual(cnts.op_count, 4)