class_docstr: Determines which tensors will be ready when running the graph.
  
  Determines which tensors from `fetches` are ready to run, using following
  algorithm.
  
  1. Determine which table initializers are ready to run.  A table initializer
     is an element of the TABLE_INITIALIZERS collection and it is ready to run
     if all the tensors it depends on are set to ready in
     `replaced_tensors_ready`.
  
  2. Determine which of `fetches` are ready to run.  A fetch is ready to run if
     it only depends on tensors in `feeds` and tensors that are set to ready in
     `replaced_tensors_ready`.
docstr: Init method for InitializableGraphAnalyzer.
  
  Args:
    graph: a `Graph`.
    input_signature: A dict whose keys are strings and values are `Tensor`s,
      `SparseTensor`s, or `RaggedTensor`s.
    replaced_tensors_ready: a list of `Tensor`, `SparseTensor`s, or
      `RaggedTensor`s, bool pairs indicating whether the `Tensor`,
      `SparseTensor`s, or `RaggedTensor`s is ready in this phase.
    translate_path_fn: (Optional) A function with the signature: (identifier,
      optional(parents)) -> Any which will be used to construct a unique path
      for a given `Tensor`.
  
  Raises:
    ValueError: If unexpected placeholders or tables are encountered, or table
        initializers do not have the expected structure in the graph.
docstr_tok: ["Init","method","for","InitializableGraphAnalyzer",".","Args",":","graph",":","a","`","Graph","`",".","input_signature",":","A","dict","whose","keys","are","strings","and","values","are","`","Tensor","`","s",",","`","SparseTensor","`","s",",","or","`","RaggedTensor","`","s",".","replaced_tensors_ready",":","a","list","of","`","Tensor","`",",","`","SparseTensor","`","s",",","or","`","RaggedTensor","`","s",",","bool","pairs","indicating","whether","the","`","Tensor","`",",","`","SparseTensor","`","s",",","or","`","RaggedTensor","`","s","is","ready","in","this","phase",".","translate_path_fn",":","(","Optional",")","A","function","with","the","signature",":","(","identifier",",","optional","(","parents",")",")","-",">","Any","which","will","be","used","to","construct","a","unique","path","for","a","given","`","Tensor","`",".","Raises",":","ValueError",":","If","unexpected","placeholders","or","tables","are","encountered",",","or","table","initializers","do","not","have","the","expected","structure","in","the","graph","."]
code: def __init__(
      self,
      graph,
      input_signature,
      replaced_tensors_ready,
      translate_path_fn=None,
  ):
      """Init method for InitializableGraphAnalyzer.
  
      Args:
        graph: a `Graph`.
        input_signature: A dict whose keys are strings and values are `Tensor`s,
          `SparseTensor`s, or `RaggedTensor`s.
        replaced_tensors_ready: a list of `Tensor`, `SparseTensor`s, or
          `RaggedTensor`s, bool pairs indicating whether the `Tensor`,
          `SparseTensor`s, or `RaggedTensor`s is ready in this phase.
        translate_path_fn: (Optional) A function with the signature: (identifier,
          optional(parents)) -> Any which will be used to construct a unique path
          for a given `Tensor`.
  
      Raises:
        ValueError: If unexpected placeholders or tables are encountered, or table
            initializers do not have the expected structure in the graph.
      """
  
      if translate_path_fn is None:
          translate_path_fn = lambda x, parents=None: None
  
      self._ready_table_initializers = []
      self._input_signature = input_signature
      replaced_tensors_ready = {
          tf_utils.hashable_tensor_or_op(t): ready
          for t, ready in replaced_tensors_ready
      }
  
      initial_source_infos_dict = self._make_source_infos_dict(
          {}, replaced_tensors_ready
      )
  
      # Determine which table initializers are ready, based on the replaced
      # tensors. Since no input tensors are fed during table initialization, we do
      # not set the value of any tensors in `input_signature`.
      graph_analyzer_for_table_init = _GraphAnalyzer(
          initial_source_infos_dict, translate_path_fn, graph
      )
      complete_source_info_dict = self._make_source_infos_dict(
          input_signature, replaced_tensors_ready
      )
  
      for table_init_op_or_tensor in graph.get_collection(
          tf.compat.v1.GraphKeys.TABLE_INITIALIZERS
      ):
          # Handle the case when an initializer was lifted out of the graph context.
          if table_init_op_or_tensor is None:
              continue
  
          if isinstance(graph, tf_func_graph.FuncGraph):
              self._log_warning(
                  "Tables initialized inside a tf.function  will be"
                  " re-initialized on every invocation of the function."
                  " This  re-initialization can have significant impact"
                  " on performance. Consider lifting  them out of the"
                  " graph context using  `tf.init_scope`.: {}".format(
                      table_init_op_or_tensor.name
                  )
              )
  
          (
              table_init_op,
              table_input_ops,
          ) = self._get_table_init_op_and_inputs(
              table_init_op_or_tensor
          )
          source_info = self._get_table_init_op_source_info(
              table_init_op,
              graph_analyzer_for_table_init,
              translate_path_fn,
          )
  
          for key in table_input_ops:
              complete_source_info_dict[
                  tf_utils.hashable_tensor_or_op(key)
              ] = source_info
          if source_info.is_ready_to_run:
              self._ready_table_initializers.append(
                  table_init_op_or_tensor
              )
  
      # Now determine which tensors are ready to run once the table has been
      # initialized.
      self._graph_analyzer = _GraphAnalyzer(
          complete_source_info_dict, translate_path_fn, graph
      )
  
imports: import collections
  import copy
  import hashlib
  import itertools
  from typing import Iterable, List, Mapping, Optional, Set, Union
  import uuid
  from absl import logging
  import tensorflow
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import common_types
  from tensorflow_transform import nodes
  from tensorflow_transform import tf_utils
  from tfx_bsl.types import tfx_namedtuple
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import function_def_to_graph
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 1 to create a new InitializableGraphAnalyzer object  with example: obj = InitializableGraphAnalyzer(graph, input_signature, replaced_tensors_ready, translate_path_fn)