code: def _generate_qconv_weight_prepack_patterns(dtype=torch.float32):
      assert dtype in [torch.float32, torch.bfloat16]
      return (
          _generate_dequant_convolution_node_pattern(
              dequantize_per_channel_weight_pattern
              if dtype == torch.float32
              else dequantize_per_channel_to_bf16_weight_pattern,
              dtype,
          ),
          # There is another pattern due to the pass of convert_conv_weights_to_channels_last
          # https://github.com/pytorch/pytorch/blob/07107919297db3f8ab37f11c12666b6d6d5f692e/torch/_inductor/freezing.py#L338-L362.
          # Depend on some heuristics, it may or may not insert to(channel_last) node
          # between convolution and dequant_per_channel node
          _generate_dequant_convolution_node_pattern(
              dequantize_per_channel_clone_weight_pattern
              if dtype == torch.float32
              else dequantize_per_channel_to_bf16_clone_weight_pattern,
              dtype,
          ),
      )
  
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 30 for calling a global function with example usage: _generate_qconv_weight_prepack_patterns(dtype) and returns: _generate_dequant_convolution_node_pattern,  _generate_dequant_convolution_node_pattern