code: def gradient_clip(gradients, max_gradient_norm):
      """Clipping gradients of a model."""
      clipped_gradients, gradient_norm = tf.clip_by_global_norm(
          gradients, max_gradient_norm
      )
      gradient_norm_summary = [
          tf.summary.scalar("grad_norm", gradient_norm)
      ]
      gradient_norm_summary.append(
          tf.summary.scalar(
              "clipped_gradient", tf.global_norm(clipped_gradients)
          )
      )
  
      return clipped_gradients, gradient_norm_summary, gradient_norm
  
imports: from __future__ import print_function
  import collections
  import os
  import time
  import numpy
  import six
  import tensorflow
  from tensorflow.python.ops import lookup_ops
  from .utils import misc_utils, vocab_utils, iterator_utils
label_desc: Use image node_id 13 for calling a global function with example usage: gradient_clip(gradients, max_gradient_norm) and returns: clipped_gradients,  gradient_norm_summary,  gradient_norm