code: def random_scale(scales, seed=None):
      def inner(t):
          t = tf.convert_to_tensor(t, preferred_dtype=tf.float32)
          scale = _rand_select(scales, seed=seed)
          shp = tf.shape(t)
          scale_shape = tf.cast(
              scale * tf.cast(shp[-3:-1], "float32"), "int32"
          )
          return tf.image.resize_bilinear(t, scale_shape)
  
      return inner
  
file_path: lucid/lucid/optvis/transform.py
imports: import tensorflow
  import numpy
  import uuid
  from lucid.optvis import param
label_desc: Use image node_id 3 for calling a global function with example usage: random_scale(scales, seed) and returns: inner, tf