code: def resize_and_pad(
      size: Union[int, Tuple[int, int]],
      pad: A.DualTransform = partial(
          A.PadIfNeeded,
          border_mode=cv2.BORDER_CONSTANT,
          value=[124, 116, 104],
      ),
  ):
      width, height = (size, size) if isinstance(size, int) else size
      return [resize(size), pad(min_height=height, min_width=width)]
  
file_path: icevision/icevision/tfms/albumentations/albumentations_helpers.py
imports: import albumentations
  from icevision.imports import *
  from icevision.core import *
  from icevision.utils.imageio import ImgSize
label_desc: Use image node_id 2 for calling a global function with example usage: resize_and_pad(size, pad) and returns: list