class_docstr: Class that analyzes a graph to determine readiness of tensors.
docstr: Determine if a given tensor or op is ready to run.
  
  A tensor is ready to run if every tensor in all its transitive dependencies
  are set to `True` in `known_ready`.
  
  Note that if a placeholder is encountered, this will result in an error as
  it is assumed that all placeholders are keys in `known_ready`.  This is
  to avoid unexpected behavior when the user creates placeholders (as opposed
  to placeholders created by the tf.Transform framework).
  
  Similarly encountering a Table op is an error because a table should be
  a key in `known_ready` (in the case of analyzing the main session run) or
  should not be encountered (in the case of analyzing the graph init run).
  
  Args:
    tensor_or_op: A `Tensor`, `SparseTensor`, `RaggedTensor` or `Operation`
  
  Returns:
    A bool indicating whether then tensor is ready to run.
  
  Raises:
    ValueError: If a placeholder or table is encountered.
    _UnexpectedTableError: If an initializable table op is encountered.
    _UnexpectedPlaceholderError: If a placeholder is encountered.
docstr_tok: ["Determine","if","a","given","tensor","or","op","is","ready","to","run",".","A","tensor","is","ready","to","run","if","every","tensor","in","all","its","transitive","dependencies","are","set","to","`","True","`","in","`","known_ready","`",".","Note","that","if","a","placeholder","is","encountered",",","this","will","result","in","an","error","as","it","is","assumed","that","all","placeholders","are","keys","in","`","known_ready","`",".","This","is","to","avoid","unexpected","behavior","when","the","user","creates","placeholders","(","as","opposed","to","placeholders","created","by","the","tf.Transform","framework",")",".","Similarly","encountering","a","Table","op","is","an","error","because","a","table","should","be","a","key","in","`","known_ready","`","(","in","the","case","of","analyzing","the","main","session","run",")","or","should","not","be","encountered","(","in","the","case","of","analyzing","the","graph","init","run",")",".","Args",":","tensor_or_op",":","A","`","Tensor","`",",","`","SparseTensor","`",",","`","RaggedTensor","`","or","`","Operation","`","Returns",":","A","bool","indicating","whether","then","tensor","is","ready","to","run",".","Raises",":","ValueError",":","If","a","placeholder","or","table","is","encountered",".","_UnexpectedTableError",":","If","an","initializable","table","op","is","encountered",".","_UnexpectedPlaceholderError",":","If","a","placeholder","is","encountered","."]
code: def ready_to_run(self, tensor_or_op):
      """Determine if a given tensor or op is ready to run.
  
      A tensor is ready to run if every tensor in all its transitive dependencies
      are set to `True` in `known_ready`.
  
      Note that if a placeholder is encountered, this will result in an error as
      it is assumed that all placeholders are keys in `known_ready`.  This is
      to avoid unexpected behavior when the user creates placeholders (as opposed
      to placeholders created by the tf.Transform framework).
  
      Similarly encountering a Table op is an error because a table should be
      a key in `known_ready` (in the case of analyzing the main session run) or
      should not be encountered (in the case of analyzing the graph init run).
  
      Args:
        tensor_or_op: A `Tensor`, `SparseTensor`, `RaggedTensor` or `Operation`
  
      Returns:
        A bool indicating whether then tensor is ready to run.
  
      Raises:
        ValueError: If a placeholder or table is encountered.
        _UnexpectedTableError: If an initializable table op is encountered.
        _UnexpectedPlaceholderError: If a placeholder is encountered.
      """
      if not isinstance(
          tensor_or_op,
          (tf.Tensor, tf.SparseTensor, tf.RaggedTensor, tf.Operation),
      ):
          raise TypeError(
              "Expected Tensor, SparseTensor, RaggedTensor, or Operation got {} of type {}".format(
                  tensor_or_op, type(tensor_or_op)
              )
          )
      return all(
          self.analyze_tensor(component).is_ready_to_run
          for component in _decompose_tensor_or_op(tensor_or_op)
      )
  
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 6 for calling the _GraphAnalyzer obj's underlying member method code with example usage: obj.ready_to_run(tensor_or_op) and returns: all