code: def _union(
      parent: EdgeOrNode,
      child: EdgeOrNode,
      shared_with_map: Dict[EdgeOrNode, EdgeOrNode],
  ) -> None:
      """Merge the subtree for `child` with `parent`, the order is important here"""
      root_parent = _find_root_edge_or_node(parent, shared_with_map)
      root_child = _find_root_edge_or_node(child, shared_with_map)
      # union the two trees by pointing the root of child to root of parent
      shared_with_map[root_child] = root_parent
  
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 2 for calling a global function with example usage: _union(parent, child, shared_with_map) without return types