code: def crop(tens: Tensor, x_min, y_min, x_max, y_max) -> Tensor:
      height, width = tens.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 to_tensor(
          tens[y_min:y_max, x_min:x_max], override_checks=True
      )
  
imports: import numpy
  import cv2
  import random
  import collections
  from ..coreten import Tensor, to_tensor
  from .._internal import _check_target_size
  from ..globals import INTER_AREA, INTER_CUBIC, INTER_NEAREST, INTER_LINEAR
  from ..annotations import Union, Tuple, Optional
label_desc: Use image node_id 13 for calling a global function with example usage: crop(tens, x_min, y_min, x_max, y_max) and returns: to_tensor