code: def test_shape_concat(self):
      # TODO: unify with opinfo tests, traces of lists dont preserve sizes in IR
      sample_inputs = sample_inputs_cat_concat(
          None, "cpu", torch.float, False
      )
  
      class CatMod(nn.Module):
          __constants__ = ["dim"]
  
          def __init__(self, dim=0):
              super().__init__()
              self.dim = dim
  
          def forward(self, x, y):
              return torch.cat([x, y], dim=self.dim)
  
      for inp in sample_inputs:
          mod = torch.jit.script(CatMod(**inp.kwargs).eval())
  
          args = inp.input
  
          # This test is hard-coded only to work with two sample inputs
          # but the OpInfo may have more/less
          if len(args) != 2:
              continue
  
          out_size = mod(*args).size()
          inps = list(mod.graph.inputs())
          inps[1].setType(inps[1].type().with_sizes(args[0].size()))
          inps[2].setType(inps[2].type().with_sizes(args[1].size()))
          self.checkShapeAnalysis(
              out_size, mod.graph, assert_propagation=True
          )
  
imports: import operator
  import unittest
  from textwrap import dedent
  import torch
  from torch import nn, Tensor
  from torch.testing import FileCheck
  from torch.testing._internal.common_methods_invocations import sample_inputs_cat_concat
  from torch.testing._internal.common_utils import make_tensor
  from torch.testing._internal.jit_utils import JitTestCase, execWrapper
  from typing import List, Any
label_desc: Use image node_id 16 for calling the TestSymbolicShapeAnalysis obj's underlying member method code with example usage: obj.test_shape_concat() and returns: torch