code: def _maybe_insert_input_observers_for_node(
      node: Node,
      qconfig: QConfigAny,
      model: torch.nn.Module,
      named_modules: Dict[str, torch.nn.Module],
      obs_or_fq_map: Dict[EdgeOrNode, ObserverOrFakeQuantize],
      is_qat: bool,
  ) -> None:
      """
      If needed, inserts observers to the input args and kwargs of `node`.
      Note: modifies `node` inplace.
  
      For example, if cur_node needs an observer after prev_node, we change from
  
        prev_node -> cur_node
  
      To
  
        prev_node -> obs -> cur_node
  
      """
      # Look through every input arg.  If that arg's target dtype does not
      # match the current node's target dtype, insert an observer.
      new_args = []
      # map from old arg to new arg, used for updating the numeric debug handle map
      remap = {}
      for arg in node.args:
          new_arg = _maybe_insert_input_observer_for_arg_or_kwarg(
              node,
              arg,
              qconfig,
              model,
              named_modules,
              obs_or_fq_map,
              is_qat,
          )
          new_args.append(new_arg)
          remap[arg] = new_arg
  
      if "numeric_debug_handle" in node.meta:
  
          def remap_fn(x):
              return remap.get(x, x)
  
          numeric_debug_handle = node.meta["numeric_debug_handle"]
          node.meta["numeric_debug_handle"] = {
              remap_fn(k): v for k, v in numeric_debug_handle.items()
          }
  
      # Clone has a memory_format kwarg and zeros_like has a pin_memory kwarg
      # that persist in exported graph. This is just a work around for these.
      assert (
          node.target == torch.ops.aten.clone.default
          or node.target == torch.ops.aten.zeros_like.default
          or len(node.kwargs) == 0
      ), " expecting kwargs for aten op IR to be empty"
  
      # assign the new args to the node, inplace
      node.args = tuple(new_args)
  
imports: import torch
  from torch._subclasses import FakeTensor
  from torch.ao.quantization.fx.prepare import _insert_obs_or_fq, _save_state, _is_activation_post_process_node, _create_obs_or_fq_from_qspec
  from torch.fx import GraphModule, Graph, Node
  from torch.fx.node import Argument
  from torch.ao.quantization import QConfigMapping
  from torch.ao.quantization.qconfig import QConfigAny
  from torch.ao.quantization.fx.custom_config import PrepareCustomConfig
  from typing import Dict, Tuple, Union, Any, Optional
  from torch.ao.quantization.quantizer import EdgeOrNode, SharedQuantizationSpec, QuantizationSpecBase
  from torch.ao.quantization import ObserverOrFakeQuantize
label_desc: Use image node_id 12 for calling a global function with example usage: _maybe_insert_input_observers_for_node(node, qconfig, model, named_modules, obs_or_fq_map, is_qat) and returns: remap