code: def pad_with_params(
      img: np.ndarray,
      h_pad_top: int,
      h_pad_bottom: int,
      w_pad_left: int,
      w_pad_right: int,
      border_mode: int = cv2.BORDER_REFLECT_101,
      value: Optional[ImageColorType] = None,
  ) -> np.ndarray:
      pad_fn = _maybe_process_in_chunks(
          cv2.copyMakeBorder,
          top=h_pad_top,
          bottom=h_pad_bottom,
          left=w_pad_left,
          right=w_pad_right,
          borderType=border_mode,
          value=value,
      )
      return pad_fn(img)
  
imports: import math
  from typing import List, Optional, Sequence, Tuple, Union
  import cv2
  import numpy
  import skimage.transform
  from scipy.ndimage import gaussian_filter
  from albumentations.augmentations.utils import _maybe_process_in_chunks, angle_2pi_range, clipped, preserve_channel_dim, preserve_shape
  from ...None import random_utils
  from ...core.bbox_utils import denormalize_bbox, normalize_bbox
  from ...core.transforms_interface import BoxInternalType, FillValueType, ImageColorType, KeypointInternalType
label_desc: Use image node_id 48 for calling a global function with example usage: pad_with_params(img, h_pad_top, h_pad_bottom, w_pad_left, w_pad_right, border_mode, value) and returns: pad_fn