code: def add_edge_bias(x, filter_size):
      """Pad x and concatenates an edge bias across the depth of x.
  
      The edge bias can be thought of as a binary feature which is unity when
      the filter is being convolved over an edge and zero otherwise.
  
      Args:
        x: Input tensor, shape (NHWC)
        filter_size: filter_size to determine padding.
      Returns:
        x_pad: Input tensor, shape (NHW(c+1))
      """
      x_shape = common_layers.shape_list(x)
      if filter_size[0] == 1 and filter_size[1] == 1:
          return x
      a = (filter_size[0] - 1) // 2  # vertical padding size
      b = (filter_size[1] - 1) // 2  # horizontal padding size
      padding = [[0, 0], [a, a], [b, b], [0, 0]]
      x_bias = tf.zeros(x_shape[:-1] + [1])
  
      x = tf.pad(x, padding)
      x_pad = tf.pad(x_bias, padding, constant_values=1)
      return tf.concat([x, x_pad], axis=3)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import numpy
  import scipy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tensorflow_probability
label_desc: Use image node_id 17 for calling a global function with example usage: add_edge_bias(x, filter_size) and returns: tf, x