code: def get_size_without_padding(
      tfms_list: List[Any],
      before_tfm_img_size: ImgSize,
      height: int,
      width: int,
  ) -> Tuple[int, int]:
      """
      Infer the height and width of the pre-processed image after removing padding.
  
      Parameters
      ----------
      tfms_list: list of albumentations transforms applied to the `before_tfm_img` image
                  before passing it to the model for inference.
      before_tfm_img_size: original image size before being pre-processed for inference.
      height: height of output image from icevision `predict` function.
      width: width of output image from icevision `predict` function.
  
      Returns
      -------
      height and width of the image coming out of the inference pipeline, after removing padding
      """
      if get_transform(tfms_list, "Pad") is not None:
          t = get_transform(tfms_list, "SmallestMaxSize")
          if t is not None:
              presize = t.max_size
              height, width = func_max_size(
                  before_tfm_img_size.height,
                  before_tfm_img_size.width,
                  presize,
                  min,
              )
  
          t = get_transform(tfms_list, "LongestMaxSize")
          if t is not None:
              size = t.max_size
              height, width = func_max_size(
                  before_tfm_img_size.height,
                  before_tfm_img_size.width,
                  size,
                  max,
              )
  
      return height, 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 4 for calling a global function with example usage: get_size_without_padding(tfms_list, before_tfm_img_size, height, width) and returns: height,  width