class_docstr: Test Case: To test simple fork/wait operation in a graph
  fork is called on simple addition operation on input tensors
class_docstr_tok: ["Test","Case",":","To","test","simple","fork\/wait","operation","in","a","graph","fork","is","called","on","simple","addition","operation","on","input","tensors"]
code: def test_create_object(self):
      class Foo:  # noqa: B903
          def __init__(self, x: torch.Tensor) -> None:
              self.x = x
  
      class Mod(torch.nn.Module):
          def __init__(self) -> None:
              super().__init__()
  
          def forward(self, y: torch.Tensor) -> torch.Tensor:
              foo = Foo(y)
              return y * foo.x
  
      mod = torch.jit.script(Mod()).eval()
      y = torch.randn((1,))
      expected = mod(y)
  
      static_mod = StaticModule(torch.jit.freeze(mod))
      actual = static_mod(y)
  
      self.assertEqual(expected, actual)
  
imports: import unittest
  from typing import Dict, Optional
  import numpy
  import torch
  from torch import nn
  from torch.testing._internal.common_utils import TestCase, run_tests
  from typing import List
label_desc: Use image node_id 21 for calling the TestStaticModule obj's underlying member method code with example usage: obj.test_create_object() and returns: unknown