code: def piecewise_affine(
      img: np.ndarray,
      matrix: Optional[skimage.transform.PiecewiseAffineTransform],
      interpolation: int,
      mode: str,
      cval: float,
  ) -> np.ndarray:
      if matrix is None:
          return img
      return skimage.transform.warp(
          img,
          matrix,
          order=interpolation,
          mode=mode,
          cval=cval,
          preserve_range=True,
          output_shape=img.shape,
      )
  
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 28 for calling a global function with example usage: piecewise_affine(img, matrix, interpolation, mode, cval) and returns: skimage, img