code: def _copy_over_q_dq_args(original_node: Node, replacement_node: Node):
      """
      Given a pair of quantize or dequantize nodes, copy over all literal args
      from the original node to the replacement node.
      """
      # For quantize_per_tensor, scale and zp are literals and need to be copied
      # For quantize_per_channel, scale and zp are get_attr nodes and should be skipped
      assert original_node.target == replacement_node.target
      if original_node.target in (
          torch.ops.quantized_decomposed.quantize_per_tensor.default,
          torch.ops.quantized_decomposed.dequantize_per_tensor.default,
      ):
          # Args: input, [scale, zp, qmin, qmax, dtype]
          start_copy_arg_index = 1
      elif original_node.target in (
          torch.ops.quantized_decomposed.quantize_per_channel.default,
          torch.ops.quantized_decomposed.dequantize_per_channel.default,
      ):
          # Args: input, scale, zp, [axis, qmin, qmax, dtype]
          start_copy_arg_index = 3
      else:
          raise ValueError(
              "Expected quantize/dequantize nodes, got '%s'"
              % original_node.target
          )
      replacement_node.args = (
          replacement_node.args[:start_copy_arg_index]
          + original_node.args[start_copy_arg_index:]
      )
  
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 21 for calling a global function with example usage: _copy_over_q_dq_args(original_node, replacement_node) without return types