code: def _apply_black_border(x, border_size):
      orig_height = x.get_shape().as_list()[1]
      orig_width = x.get_shape().as_list()[2]
      x = tf.image.resize_images(
          x,
          (orig_width - 2 * border_size, orig_height - 2 * border_size),
      )
  
      return tf.pad(
          x,
          [
              [0, 0],
              [border_size, border_size],
              [border_size, border_size],
              [0, 0],
          ],
          "CONSTANT",
      )
  
imports: import warnings
  import numpy
  from six.moves import xrange
  import tensorflow
  import tensorflow_addons
  from cleverhans.attacks.attack import Attack
  from cleverhans.compat import reduce_mean, reduce_sum, reduce_max
  from cleverhans.model import Model
  from cleverhans import utils_tf
label_desc: Use image node_id 3 for calling a global function with example usage: _apply_black_border(x, border_size) and returns: tf