class_docstr: Tests optimization.
      
docstr: Tests get_train_op.
          
code: def test_get_train_op(self):
      """Tests get_train_op."""
      var = tf.Variable(0.0)
      loss = tf.nn.l2_loss(var)
      train_op = opt.get_train_op(loss)
      self.assertTrue(tf.contrib.framework.is_tensor(train_op))
  
file_path: texar/tests/core/optimization_test.py
imports: import numpy
  import tensorflow
  import texar.tf.core.optimization
  from texar.tf.utils import utils
label_desc: Use image node_id 4 for calling the OptimizationTest obj's underlying member method code with example usage: obj.test_get_train_op() without return types