code: def test_adaptive_avg_pool2d(self):
      inps = [
          [(1, 64, 8, 9), (5, 7)],
          [(1, 64, 10, 9), (7)],
          [(1, 64, 10, 9), (5, None)],
          [(1, 8, 4, 3), (None, None)],
          [(1, 8, 4, 3), (None, 5)],
      ]
  
      for inp in inps:
          t = torch.randn(*inp[0])
          out_size = torch.nn.functional.adaptive_avg_pool2d(
              t, inp[1]
          ).size()
  
          def foo(x):
              return torch.nn.functional.adaptive_avg_pool2d(x, inp[1])
  
          fn = torch.jit.trace(foo, (t,))
          torch._C._jit_erase_non_input_shape_information(fn.graph)
          torch._C._jit_pass_peephole(fn.graph)
          torch._C._jit_pass_constant_propagation(fn.graph)
          self.checkShapeAnalysis(
              out_size, fn.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 12 for calling the TestSymbolicShapeAnalysis obj's underlying member method code with example usage: obj.test_adaptive_avg_pool2d() and returns: torch