code: def pad(x, p=3):
      """Pad tensor in H, W
  
      Remarks:
          TensorFlow uses "ceil(input_spatial_shape[i] / strides[i])" rather than explicit padding
          like Caffe, pyTorch does. Hence, we need to pad here beforehand.
  
      Args:
          x (tf.tensor): incoming tensor
          p (int, optional): padding for H, W
  
      Returns:
          tf.tensor: padded tensor
      """
      return tf.pad(x, [[0, 0], [0, 0], [p, p], [p, p]])
  
imports: import tensorflow
  from tensorpack import ModelDesc, argscope, enable_argscope_for_module
label_desc: Use image node_id 1 for calling a global function with example usage: pad(x, p) and returns: tf