code: def crop(
      img: np.ndarray, x_min: int, y_min: int, x_max: int, y_max: int
  ):
      height, width = img.shape[:2]
      if x_max <= x_min or y_max <= y_min:
          raise ValueError(
              "We should have x_min < x_max and y_min < y_max. But we got"
              " (x_min = {x_min}, y_min = {y_min}, x_max = {x_max}, y_max = {y_max})".format(
                  x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max
              )
          )
  
      if x_min < 0 or x_max > width or y_min < 0 or y_max > height:
          raise ValueError(
              "Values for crop should be non negative and equal or smaller than image sizes"
              "(x_min = {x_min}, y_min = {y_min}, x_max = {x_max}, y_max = {y_max}, "
              "height = {height}, width = {width})".format(
                  x_min=x_min,
                  x_max=x_max,
                  y_min=y_min,
                  y_max=y_max,
                  height=height,
                  width=width,
              )
          )
  
      return img[y_min:y_max, x_min: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 11 for calling a global function with example usage: crop(img, x_min, y_min, x_max, y_max) and returns: img