code: def clip_by_value(t, clip_value_min, clip_value_max, name=None):
      """
      A wrapper for clip_by_value that casts the clipping range if needed.
      """
  
      def cast_clip(clip):
          """
          Cast clipping range argument if needed.
          """
          if t.dtype in (tf.float32, tf.float64):
              if hasattr(clip, "dtype"):
                  # Convert to tf dtype in case this is a numpy dtype
                  clip_dtype = tf.as_dtype(clip.dtype)
                  if clip_dtype != t.dtype:
                      return tf.cast(clip, t.dtype)
          return clip
  
      clip_value_min = cast_clip(clip_value_min)
      clip_value_max = cast_clip(clip_value_max)
  
      return tf.clip_by_value(t, clip_value_min, clip_value_max, name)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  import math
  import os
  import time
  import warnings
  import numpy
  import six
  from six.moves import xrange
  import tensorflow
  from cleverhans.compat import device_lib
  from cleverhans.compat import reduce_sum, reduce_mean
  from cleverhans.compat import reduce_max
  from cleverhans.compat import softmax_cross_entropy_with_logits
  from cleverhans.utils import batch_indices, _ArgsWrapper, create_logger
label_desc: Use image node_id 19 for calling a global function with example usage: clip_by_value(t, clip_value_min, clip_value_max, name) and returns: tf, clip, tf