code: def pad(w, mode="REFLECT", constant_value=0.5):
      def inner(t_image):
          if constant_value == "uniform":
              constant_value_ = tf.random_uniform([], 0, 1)
          else:
              constant_value_ = constant_value
          return tf.pad(
              t_image,
              [(0, 0), (w, w), (w, w), (0, 0)],
              mode=mode,
              constant_values=constant_value_,
          )
  
      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 2 for calling a global function with example usage: pad(w, mode, constant_value) and returns: inner, tf