code: def _is_valid_quantized_maxpool2d_optimization_pattern():
      def fn(match):
          # Only match the pattern which max_pool2d_with_indices returns value
          # instead of indices.
          get_item_node = filter_nodes(match.nodes, operator.getitem)[0]
          return get_item_node.args[1] == 0
  
      return fn
  
imports: import copy
  import functools
  import itertools
  import math
  import operator
  from typing import Any, Tuple
  import torch
  from torch._dynamo.utils import counters
  from torch.fx.experimental.symbolic_shapes import has_free_symbols
  from ..lowering import lowerings, require_channels_last
  from ..pattern_matcher import Arg, CallFunction, filter_nodes, KeywordArg, ListOf, Match
  from ..utils import pad_listlike
  from .freezing_patterns import register_freezing_graph_pattern
  from .post_grad import register_lowering_pattern
label_desc: Use image node_id 16 for calling a global function with example usage: _is_valid_quantized_maxpool2d_optimization_pattern() and returns: fn, unknown