code: def _pad(input_image, image_shape, factor):
      """Pad `input_image` such that H and W are divisible by `factor`."""
      with tf.name_scope("pad"):
          height, width = image_shape[0], image_shape[1]
          pad_height = (factor - (height % factor)) % factor
          pad_width = (factor - (width % factor)) % factor
          return tf.pad(
              input_image,
              [[0, 0], [0, pad_height], [0, pad_width], [0, 0]],
              "REFLECT",
          )
  
imports: import collections
  import glob
  import itertools
  from compare_gan.gans import loss_lib
  import tensorflow.compat.v1
  import tensorflow_datasets
  from hific import archs
  from hific import helpers
  from hific.helpers import ModelMode
  from hific.helpers import ModelType
  from hific.helpers import TFDSArguments
label_desc: Use image node_id 1 for calling a global function with example usage: _pad(input_image, image_shape, factor) and returns: tf