code: def rand_crop(
      tens: Tensor, crop_height, crop_width, h_start, w_start
  ) -> Tensor:
      height, width = tens.shape[:2]
      if height < crop_height or width < crop_width:
          raise ValueError(
              "Requested crop size ({crop_height}, {crop_width}) is "
              "larger than the image size ({height}, {width})".format(
                  crop_height=crop_height,
                  crop_width=crop_width,
                  height=height,
                  width=width,
              )
          )
      x1, y1, x2, y2 = _get_random_crop_coords(
          height, width, crop_height, crop_width, h_start, w_start
      )
  
      return to_tensor(tens[y1:y2, x1:x2], 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 15 for calling a global function with example usage: rand_crop(tens, crop_height, crop_width, h_start, w_start) and returns: to_tensor