code: def test_stitching_multi_output(self):
      max_pool = torch.nn.MaxPool2d(
          kernel_size=3,
          stride=2,
          padding=1,
          dilation=1,
          ceil_mode=False,
          return_indices=True,
      )
      tensor = torch.rand(1, 3, 224, 224)
      mod = torch.jit.trace(max_pool, (tensor,))
      mod = torch.jit.freeze(mod.eval())
      inp = list(mod.graph.inputs())[1]
      inp.setType(inp.type().with_sizes([None, None, None, None]))
      output_tensor = list(mod(tensor)[0].size())
      self.run_pass("lower_all_tuples", mod.graph)
      shape_compute_graph = torch._C._jit_pass_propagate_shapes_on_graph_and_build_compute(
          mod.graph
      )
      max_pool_node = mod.graph.findNode(
          "aten::max_pool2d_with_indices"
      )
      outs = list(max_pool_node.outputs())
      self.assertEqual(
          outs[0].type().symbolic_sizes(),
          outs[1].type().symbolic_sizes(),
      )
      g = shape_compute_graph.partial_eval_shape_graph()
      # to make into a jit function cant have multiple outputs
      g.makeMultiOutputIntoTuple()
      func = torch._C._create_function_from_graph(
          "partial_eval_graph", g
      )
      mapping = shape_compute_graph.graph_output_to_symbolic_shape_dim()
      output_shape = func(tensor.size())
      # the first 4 dims are input sym dimensions, then the ,
      self.assertEqual(list(output_shape[0:4]), list(tensor.size()))
      self.assertEqual(list(output_shape[4:]), output_tensor[2:])
  
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 24 for calling the TestSymbolicShapeAnalysis obj's underlying member method code with example usage: obj.test_stitching_multi_output() without return types