code: def clip_by_global_norm(value_list, clip_norm):
      use_norm = global_norm(value_list)
      # Calculate L2-norm, clip elements by ratio of clip_norm to L2-norm
      scale_for_finite = clip_norm * ops.minimum(
          1.0 / use_norm, 1.0 / clip_norm
      )
      # If use_norm is any finite number, this is a no-op. For inf/-inf/NaN,
      # this will make scale NaN.
      scale = scale_for_finite + (use_norm - use_norm)
      values_clipped = []
      for v in value_list:
          if v is None:
              values_clipped.append(None)
          else:
              values_clipped.append(v * scale)
      return values_clipped
  
imports: import re
  import warnings
  import numpy
  from keras import backend
  from keras import initializers
  from keras import ops
  from keras.optimizers.schedules import learning_rate_schedule
  from keras.saving import serialization_lib
  from keras.utils import tracking
  from keras.utils.naming import auto_name
label_desc: Use image node_id 2 for calling a global function with example usage: clip_by_global_norm(value_list, clip_norm) and returns: values_clipped