class_docstr: Remove duplicated large constants (tensor with 100+ elements)
  
  For example
  
  .. code-block::
  
      Input graph (where weight and bias are large constants):
          weight_q = const(weight)
          weight_k = const(weight)
          bias_q = const(bias)
          bias_k = const(bias)
          q_embedding = linear(x=q, weight=weight_q, bias=bias_q)
          k_embedding = linear(x=k, weight=weight_k, bias=bias_k)
  
      Output graph:
          weight_q = const(weight)
          bias_q = const(bias)
          q_embedding = linear(x=q, weight=weight_q, bias=bias_q)
          k_embedding = linear(x=k, weight=weight_q, bias=bias_q)
  
  Concretely, this graph pass consists of two stages:
  
  (1) Deduplication of ``const`` op:
  
      We consider a ``const`` as duplicated if there exists such a previous ``const`` that has same dtype and value
  
  (2) Deduplication of ``constexpr_*`` op:
  
      We consider a ``constexpr_*`` as duplicated if there exists such a previous ``constexpr_*`` that has the same ``op_type`` and input attributes.
code: def apply(self, prog) -> None:
      for f in prog.functions.values():
          self._constant_deduplication_block(f)
  
file_path: coremltools/coremltools/converters/mil/mil/passes/defs/cleanup/const_deduplication.py
imports: import hashlib
  from typing import Dict, List, Tuple
  import numpy
  from coremltools.converters.mil.mil import Block, Var, ListVar, types
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
  from coremltools.converters.mil.mil.passes.helper import block_context_manager
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
label_desc: Use image node_id 1 for calling the const_deduplication obj's underlying member method code with example usage: obj.apply(prog) without return types