class_docstr: A visitor that inspects the graph and removes redundant merge nodes.
  
  This visitor removes the redundant flatten and packed merge nodes added
  by the _PackMergeCombineVisitor and reconstructs the descendants of the
  removed nodes with the final flatten and packed merge node.
class_docstr_tok: ["A","visitor","that","inspects","the","graph","and","removes","redundant","merge","nodes",".","This","visitor","removes","the","redundant","flatten","and","packed","merge","nodes","added","by","the","_PackMergeCombineVisitor","and","reconstructs","the","descendants","of","the","removed","nodes","with","the","final","flatten","and","packed","merge","node","."]
code: def _get_final_packed_combine_and_tensor_bindings(self, input_values):
      final_packed_merge_combine = None
      final_packed_merge_combine_tensor_bindings = []
      for value in input_values:
          # PackedCombineMerge is the first not post-processing node on backwards
          # traversal. Post-processing nodes form a tree, it is enough to iterate
          # through first inputs.
          packed_combine = value.parent_operation.inputs[0]
          while self._is_packed_post_processing_node(packed_combine):
              packed_combine = packed_combine.parent_operation.inputs[0]
          # If the input is generated from the final packed merge node, add it to
          # the filtered inputs and keep track of the node for reconstruction of
          # the other inputs.
          packed_combine_op_def = (
              packed_combine.parent_operation.operation_def
          )
          if isinstance(
              packed_combine_op_def, analyzer_nodes.PackedCombineMerge
          ) and (
              packed_combine_op_def.label
              == self._final_packed_merge_combine_label
          ):
              final_packed_merge_combine = packed_combine
              final_packed_merge_combine_tensor_bindings.append(value)
      return (
          final_packed_merge_combine,
          final_packed_merge_combine_tensor_bindings,
      )
  
imports: import collections
  import dataclasses
  from typing import Sequence
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import nodes
  from tensorflow_transform.beam import beam_nodes
label_desc: Use image node_id 6 for calling the _RemoveRedundantPackedMergeCombineVisitor obj's underlying member method code with example usage: obj._get_final_packed_combine_and_tensor_bindings(input_values) and returns: final_packed_merge_combine,  final_packed_merge_combine_tensor_bindings