code: def crop(
      img: Tensor, top: int, left: int, height: int, width: int
  ) -> Tensor:
      """Crop the given image at specified location and output size.
      If the image is torch Tensor, it is expected
      to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions.
      If image size is smaller than output size along any edge, image is padded with 0 and then cropped.
  
      Args:
          img (PIL Image or Tensor): Image to be cropped. (0,0) denotes the top left corner of the image.
          top (int): Vertical component of the top left corner of the crop box.
          left (int): Horizontal component of the top left corner of the crop box.
          height (int): Height of the crop box.
          width (int): Width of the crop box.
  
      Returns:
          PIL Image or Tensor: Cropped image.
      """
  
      if not torch.jit.is_scripting() and not torch.jit.is_tracing():
          _log_api_usage_once(crop)
      if not isinstance(img, torch.Tensor):
          return F_pil.crop(img, top, left, height, width)
  
      return F_t.crop(img, top, left, height, width)
  
imports: import math
  import numbers
  import sys
  import warnings
  from enum import Enum
  from typing import Any, List, Optional, Tuple, Union
  import numpy
  import torch
  from PIL import Image
  from torch import Tensor
  from ..utils import _log_api_usage_once
  from .None import _functional_pil, _functional_tensor
label_desc: Use image node_id 15 for calling a global function with example usage: crop(img, top, left, height, width) and returns: F_t, F_pil