code: def clamping_crop(
      img: np.ndarray, x_min: int, y_min: int, x_max: int, y_max: int
  ):
      h, w = img.shape[:2]
      if x_min < 0:
          x_min = 0
      if y_min < 0:
          y_min = 0
      if y_max >= h:
          y_max = h - 1
      if x_max >= w:
          x_max = w - 1
      return img[int(y_min) : int(y_max), int(x_min) : int(x_max)]
  
imports: from typing import Optional, Sequence, Tuple
  import cv2
  import numpy
  from albumentations.augmentations.utils import _maybe_process_in_chunks, preserve_channel_dim
  from ...core.bbox_utils import denormalize_bbox, normalize_bbox
  from ...core.transforms_interface import BoxInternalType, KeypointInternalType
  from ..geometric import functional
label_desc: Use image node_id 13 for calling a global function with example usage: clamping_crop(img, x_min, y_min, x_max, y_max) and returns: img