def METHOD_NAME(self):
    graph_analyzer = GraphAnalyzer()
    graph_analyzer.graph = copy.deepcopy(self.graph_def)
    graph_analyzer.parse_graph()
    new_constant_value = np.random.random([4, 1])
    new_constant_type = tf.as_dtype(np.float32(new_constant_value).dtype)
    new_constant_node = GraphRewriterHelper.create_constant_node(
        self.add_node.name + "_const", new_constant_value, new_constant_type
    )
    assert graph_analyzer.replace_constant_graph_with_constant_node(new_constant_node, self.add_node.name)
    result_graph = graph_analyzer.dump_graph()
    assert len(list(result_graph.node)) == 10
    new_constant_value = np.random.random([4, 1])
    new_constant_type = tf.as_dtype(np.float32(new_constant_value).dtype)
    new_constant_node = GraphRewriterHelper.create_constant_node(
        self.mul_node.name + "_const", new_constant_value, new_constant_type
    )
    assert graph_analyzer.replace_constant_graph_with_constant_node(new_constant_node, self.mul_node.name)
    result_graph = graph_analyzer.dump_graph()
    assert len(list(result_graph.node)) == 8
    new_constant_value = np.random.random([4, 1])
    new_constant_type = tf.as_dtype(np.float32(new_constant_value).dtype)
    new_constant_node = GraphRewriterHelper.create_constant_node(
        self.sqrt_node.name + "_const", new_constant_value, new_constant_type
    )
    assert graph_analyzer.replace_constant_graph_with_constant_node(new_constant_node, self.sqrt_node.name)
    result_graph = graph_analyzer.dump_graph()
    assert len(list(result_graph.node)) == 7
    new_constant_value = np.random.random([4, 1])
    new_constant_type = tf.as_dtype(np.float32(new_constant_value).dtype)
    new_constant_node = GraphRewriterHelper.create_constant_node(
        self.block_node.name + "_const", new_constant_value, new_constant_type
    )
    assert not graph_analyzer.replace_constant_graph_with_constant_node(new_constant_node, self.block_node.name)