def _compute_analysis_result(self, tensor_or_op, parent_analysis_results):
    """Compute analysis result for a tensor or op with its parent results."""
    hashable = tf_utils.hashable_tensor_or_op(tensor_or_op)
    if hashable in self._source_info_dict:
      source_info = self._source_info_dict[hashable]
      # source_info.name may be None but that just means that it relies on an
      # output of a previous analyzer, so that's ok.
      return _AnalysisResult(
          is_ready_to_run=source_info.is_ready_to_run,
          path=self._translate_path_fn(source_info.name),
          dependent_sources={hashable})

    func_graphs_analysis_results = (
        self._compute_analysis_results_for_func_attributes(
            tensor_or_op, parent_analysis_results))

    result = _AnalysisResult(
        is_ready_to_run=all(
            analysis_result.is_ready_to_run
            for analysis_result in (parent_analysis_results +
                                    func_graphs_analysis_results)),
        path=self._translate_path_fn(
            tensor_or_op,
            parents=[
                parent_analysis_result.path
                for parent_analysis_result in parent_analysis_results
            ] +
            [func_result.path for func_result in func_graphs_analysis_results]),
        dependent_sources=set())
    for parent_analysis_result in parent_analysis_results:
      result.dependent_sources.update(parent_analysis_result.dependent_sources)
    for func_result in func_graphs_analysis_results:
      result.dependent_sources.update(func_result.dependent_sources)
    return result
Compute analysis result for a tensor or op with its parent results.
tensorflow_transform/graph_tools.py