def METHOD_NAME(self):
    """Fold all the sequences only consist of const and self.supported_op_type.
    Args:
      input_graph_def (graphdef): graphdef object
    Returns:
       [graphdef]: optimized graph
    """
    while not self.check_all_folded():
        for node_name, _ in self.graph_info.copy().items():
            if self.check_const_inputs(node_name):
                fold_value = self._fold_value(node_name)
                fold_type = tf.as_dtype(fold_value.dtype)
                new_constant_node = GraphRewriterHelper.create_constant_node(
                    node_name + "_const", fold_value, fold_type
                )
                self.graph_analyzer.replace_constant_graph_with_constant_node(new_constant_node, node_name)
    output_graph_def = self.graph_analyzer.dump_graph()
    return output_graph_def