docstr: Make sure arguments can be passed correctly.
docstr_tok: ["Make","sure","arguments","can","be","passed","correctly","."]
code: def testBasic(self):
      """Make sure arguments can be passed correctly."""
      a = constant_op.constant(10, name="a")
      b = constant_op.constant(20, name="b")
      c = math_ops.add_n([a, b], name="c")
      d = math_ops.add_n([b, c], name="d")
      train_op = ops.get_collection_ref(ops.GraphKeys.TRAIN_OP)
      # Being a train_op will make 'd' to be added as a fetch node.
      train_op.append(d)
      mg = meta_graph.create_meta_graph_def(
          graph=ops.get_default_graph()
      )
  
      config = config_pb2.ConfigProto()
      rewriter_config = config.graph_options.rewrite_options
      rewriter_config.optimizers.append("constfold")
      rewriter_config.min_graph_nodes = -1
  
      graph = tf_optimizer.OptimizeGraph(config, mg)
  
      self.assertEqual(len(graph.node), 1)
      self.assertItemsEqual([node.name for node in graph.node], ["d"])
  
file_path: tensorflow-upstream/tensorflow/python/grappler/tf_optimizer_test.py
imports: from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import meta_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.grappler import item
  from tensorflow.python.grappler import tf_optimizer
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the PyWrapOptimizeGraphTest obj's underlying member method code with example usage: obj.testBasic() without return types