code: def _append_qdq(x, is_per_channel, kwargs):
      """
      Helper function to append q-dq ops after `x`, using dummy values for the qparams
      and qmin/qmax. We use dummy values here because we match with `ignore_literals=True`
      and will manually replace these values after subgraph rewriting.
  
      Return the dq node.
      """
      # Dummy args to be passed into q-dq ops
      per_channel_axis = 0
      scale = kwargs["scale"] if is_per_channel else 1.0
      zp = kwargs["zero_point"] if is_per_channel else 0
      qmin = -127
      qmax = 127
      dtype = torch.int8
  
      qd = torch.ops.quantized_decomposed
      if is_per_channel:
          x = qd.quantize_per_channel(
              x, scale, zp, per_channel_axis, qmin, qmax, dtype
          )
          x = qd.dequantize_per_channel(
              x, scale, zp, per_channel_axis, qmin, qmax, dtype
          )
      else:
          x = qd.quantize_per_tensor(x, scale, zp, qmin, qmax, dtype)
          x = qd.dequantize_per_tensor(x, scale, zp, qmin, qmax, dtype)
      return x
  
imports: import dataclasses
  import itertools
  import operator
  from typing import Any, Callable, Dict, List, Tuple, TYPE_CHECKING
  import torch
  from torch.fx import Graph, GraphModule, Node
  from torch.fx.subgraph_rewriter import replace_pattern_with_filters, ReplacedPatterns
  import torch.nn.functional
  from torch.ao.quantization.fx._decomposed import quantized_decomposed_lib
  from torch.ao.quantization.quantizer import DerivedQuantizationSpec, EdgeOrNode, SharedQuantizationSpec, QuantizationSpecBase
  from .utils import _conv1d_bn_example_inputs, _conv2d_bn_example_inputs, _is_conv, _is_bn_node, fold_bn_weights_into_conv_node, get_aten_graph_module
label_desc: Use image node_id 5 for calling a global function with example usage: _append_qdq(x, is_per_channel, kwargs) and returns: x