code: def _union_input_edge_with(
      input_edge,
      input_edge_root_qspec,
      edge_or_node,
      edge_or_node_to_qspec,
      shared_with_map,
  ):
      """Union input edge with another edge or node, used in implicit sharing to point the current input
      edge to other user edges of the producer node, or the output of producer node since these are
      referring to the same Tensor
      """
      root_qspec = None
      if edge_or_node in edge_or_node_to_qspec:
          qspec = edge_or_node_to_qspec[edge_or_node]
          root_qspec = _unwrap_shared_qspec(
              qspec, edge_or_node_to_qspec, shared_with_map
          )
      # TODO: add assertions for types of root qspecs
      if (
          root_qspec is not None
          and _has_same_dtype(root_qspec, input_edge_root_qspec)
          and _has_same_is_dynamic(root_qspec, input_edge_root_qspec)
      ):
          # the input arg to the node should reuse the existing output observer for arg
          # since dtype is the same (we may want to extend this to be a more strict check
          # in the future)
          # so we point from `input_edge` to `arg` (output of the argument)
          _union(edge_or_node, input_edge, shared_with_map)
  
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 8 for calling a global function with example usage: _union_input_edge_with(input_edge, input_edge_root_qspec, edge_or_node, edge_or_node_to_qspec, shared_with_map) without return types