code: def quantization_pass_impl(fn):
      all_quantization_ops = [
          i for i in fn.graph.values() if "FakeQuant" in i.op
      ]
      for node in all_quantization_ops:
          is_const_input = True
          for input in node.inputs:
              if fn.graph[input].op != "Const":
                  is_const_input = False
          if not is_const_input and ("weights_quant" not in input):
              # If activation quantization -
              # Delete the FakeQuant op and its const inputs,
              # Append FakeQuant Op's outputs to its input node's outputs,
              # Modify the FakeQuant op's outputs to reflect the 'new' input node.
              delete_fakequant_node_and_repair_graph(fn.graph, node)
          else:
              # If weight quantization -
              # Add attributes of the FakeQuant op to its output's attr dict
              for output in node.outputs:
                  output_node = fn.graph[output]
                  output_node.attr["quantize"] = True
                  output_node.attr["num_bits"] = node.attr["num_bits"]
                  output_node.attr["narrow_range"] = node.attr[
                      "narrow_range"
                  ]
                  output_node.attr["quantize_min"] = fn.graph[
                      node.inputs[1]
                  ].value.val
                  output_node.attr["quantize_max"] = fn.graph[
                      node.inputs[2]
                  ].value.val
  
label_desc: Use image node_id 2 for calling a global function with example usage: quantization_pass_impl(fn) without return types