code: def testClipByGlobalNormClipped(self):
      # Norm clipping when clip_norm < 5
      with self.session():
          x0 = constant_op.constant(
              [-2.0, 0.0, 0.0, 4.0, 0.0, 0.0], shape=[2, 3]
          )
          x1 = constant_op.constant([1.0, -2.0])
          # Global norm of x0 and x1 = sqrt(1 + 4^2 + 2^2 + 2^2) = 5
          clip_norm = 4.0
  
          # Answers are the original tensors scaled by 4.0/5.0
          np_ans_0 = [[-1.6, 0.0, 0.0], [3.2, 0.0, 0.0]]
          np_ans_1 = [0.8, -1.6]
  
          ans, norm = clip_ops.clip_by_global_norm((x0, x1), clip_norm)
          tf_ans_1 = self.evaluate(ans[0])
          tf_ans_2 = self.evaluate(ans[1])
          tf_norm = self.evaluate(norm)
  
      self.assertAllClose(tf_norm, 5.0)
      self.assertAllClose(np_ans_0, tf_ans_1)
      self.assertAllClose(np_ans_1, tf_ans_2)
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 19 for calling the ClipTest obj's underlying member method code with example usage: obj.testClipByGlobalNormClipped() without return types