code: def pad_patch(image_patch, padding_size, channel_last=True):
      """Pads image_patch with with padding_size edge values."""
  
      if channel_last:
          return np.pad(
              image_patch,
              (
                  (padding_size, padding_size),
                  (padding_size, padding_size),
                  (0, 0),
              ),
              "edge",
          )
      else:
          return np.pad(
              image_patch,
              (
                  (0, 0),
                  (padding_size, padding_size),
                  (padding_size, padding_size),
              ),
              "edge",
          )
  
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: pad_patch(image_patch, padding_size, channel_last) and returns: np, np