code: def test_dir(self):
      def test_module_dir(mod):
          dir_set = dir(mod)
          scripted_mod = torch.jit.script(mod)
          dir_scripted = set(dir(scripted_mod))
          # set not currently copied over
          ignore_set = [
              "training",
              "__delitem__",
              "__setitem__",
              "clear",
              "items",
              "keys",
              "pop",
              "update",
              "values",
          ]
          for attr in dir_set:
              if attr in ignore_set:
                  continue
              self.assertTrue(attr in dir_scripted, attr)
  
      class MyModule(nn.Module):
          def __init__(self):
              super().__init__()
              self.conv = nn.Conv2d(10, 10, 3)
              self.lin = nn.Linear(10, 10)
  
          def forward(self, x):
              return self.lin(x) + self.conv(x)
  
      test_module_dir(MyModule())
  
      # test custom __dir__ for containers
      conv = nn.Conv2d(10, 10, 3)
      linear = nn.Linear(10, 10)
  
      test_module_dir(nn.Sequential(conv, linear))
      test_module_dir(
          nn.ModuleDict(
              OrderedDict([("conv", conv), ("linear", linear)])
          )
      )
  
imports: import os
  import re
  import sys
  import types
  import typing
  import typing_extensions
  from typing import List, Dict, Optional, Tuple
  import torch
  import torch.jit.frontend
  import torch.nn
  from torch import Tensor
  from torch.testing import FileCheck
  from collections import OrderedDict
  from torch.testing._internal.jit_utils import JitTestCase, _tmp_donotuse_dont_inline_everything
label_desc: Use image node_id 13 for calling the TestRecursiveScript obj's underlying member method code with example usage: obj.test_dir() and returns: unknown