code: def test_variatic_arg_matching(self):
      inputs = (torch.randn(20, 16, 50, 32),)
  
      def maxpool(x, kernel_size, stride, padding, dilation):
          return torch.ops.aten.max_pool2d_with_indices.default(
              x, kernel_size, stride, padding, dilation
          )
  
      maxpool_graph = torch.fx.symbolic_trace(maxpool).graph
  
      maxpool_matcher = SubgraphMatcher(maxpool_graph)
      match_result = maxpool_matcher.match(maxpool_graph)
      self.assertEqual(len(match_result), 1)
  
      # Graph only contains "stride" argument
      maxpool_s = torch.nn.MaxPool2d(kernel_size=2, stride=1).eval()
      maxpool_s_graph = make_fx(maxpool_s)(*inputs).graph
      match_s_result = maxpool_matcher.match(maxpool_s_graph)
      self.assertEqual(len(match_s_result), 1)
  
      # Graph only contains "padding" argument
      maxpool_p = torch.nn.MaxPool2d(kernel_size=2, padding=1)
      maxpool_p_graph = make_fx(maxpool_p)(*inputs).graph
      match_p_result = maxpool_matcher.match(maxpool_p_graph)
      self.assertEqual(len(match_p_result), 1)
  
      # Graph only contains "stride, padding" argument
      maxpool_sp = torch.nn.MaxPool2d(
          kernel_size=2, stride=1, padding=1
      )
      maxpool_sp_graph = make_fx(maxpool_sp)(*inputs).graph
      match_sp_result = maxpool_matcher.match(maxpool_sp_graph)
      self.assertEqual(len(match_sp_result), 1)
  
imports: import os
  import sys
  import torch
  import torch.nn.functional
  from torch.fx import symbolic_trace
  from torch.fx.experimental.proxy_tensor import make_fx
  from torch.fx.passes.utils.matcher_utils import SubgraphMatcher
  from torch.testing._internal.jit_utils import JitTestCase
  from torch.fx.passes.utils.matcher_with_name_node_map_utils import SubgraphMatcherWithNameNodeMap
  from torch.testing._internal.common_utils import IS_WINDOWS
  from torch.testing._internal.common_utils import run_tests
  import unittest
label_desc: Use image node_id 5 for calling the TestMatcher obj's underlying member method code with example usage: obj.test_variatic_arg_matching() and returns: torch