code: def inline_input_quant_params_for_fx(
      graph, params, param_debug_name_map
  ):
      """
      Canonicalize input scale and zero point access for FX-quantized graphs.
      We expect input qparams to aten::quantize_per_tensor to be prim::Constant, but that's
      not the case for FX-based quantized models as shown below.
      We replace prim::GetAttr with prim::Constant so that FX-based quantized models can be
      converted in the same way as eager-mode based quantized models.
  
      Before:
      %pan_input_zero_point_1 : Tensor = prim::GetAttr[name="pan_input_zero_point_1"](%backbone)
      %pan_input_scale_1 : Tensor = prim::GetAttr[name="pan_input_scale_1"](%backbone)
      ...
      %quantize_per_tensor_2 ... = aten::quantize_per_tensor(...,
                                         %pan_input_scale_1, %pan_input_zero_point_1, ...)
  
      After:
      %2402 : int = prim::Constant[value=0]()
      %2403 : float = prim::Constant[value=1.]()
      %quantize_per_tensor_2 ...  = aten::quantize_per_tensor(..., %2403, %2402, ...)
      """
      # pylint: disable=c-extension-no-member
      import torch
  
      for node in graph.findAllNodes("prim::GetAttr", recurse=True):
          out_name = node.output().debugName()
  
          if "_scale" in out_name or "_zero_point" in out_name:
              full_attr = param_debug_name_map[out_name]
              assert (
                  full_attr in params
              ), f"{full_attr} not found in param dict."
              param_np = params[full_attr].numpy()
              new_const_node = graph.create("prim::Constant")
              new_const_node.insertBefore(node)
  
              if "_scale" in out_name:
                  new_const_node.f_("value", param_np)
                  new_const_node.output().setType(
                      torch._C.FloatType.get()
                  )
              else:
                  new_const_node.i_("value", param_np.item())
                  new_const_node.output().setType(
                      torch._C.IntType.get()
                  )
  
              node.replaceAllUsesWith(new_const_node)
  
imports: import numpy
  import tvm
  from tvm import relay
  from tvm.relay import expr
  from tvm.relay import op
  from tvm.relay.frontend.common import infer_shape
  from .common import logger
  from .pytorch_utils import is_version_greater_than
label_desc: Use image node_id 14 for calling a global function with example usage: inline_input_quant_params_for_fx(graph, params, param_debug_name_map) without return types