code: def test_set_attr_in_method(self):
      class FooTest:
          def __init__(self, x: int) -> None:
              self.foo = x
  
          def incFooTest(self, y: int) -> None:
              self.foo = self.foo + y
  
      @torch.jit.script
      def fn(x: int) -> int:
          foo = FooTest(x)
          foo.incFooTest(2)
          return foo.foo
  
      self.assertEqual(fn(1), 3)
  
imports: import io
  import os
  import sys
  import unittest
  import torch
  import torch.nn
  from torch.testing import FileCheck
  from typing import Any
  from torch.testing._internal.jit_utils import JitTestCase, make_global
  import torch.testing._internal.jit_utils
  from torch.testing._internal.common_utils import IS_SANDCASTLE, skipIfTorchDynamo
  from typing import List, Tuple, Iterable, Optional, Dict
label_desc: Use image node_id 5 for calling the TestClassType obj's underlying member method code with example usage: obj.test_set_attr_in_method() and returns: foo