code: def _compute_centre_crop(tens, target_size) -> Tensor:
      _check_target_size(target_size)
  
      # Getting org height and target
      org_h, org_w = tens.shape[:2]
      target_w, target_h = target_size
  
      # The following line is actually the right way of accessing height and width of an opencv-specific image (height, width). However for some reason, while the code runs, this is flipped (it now becomes (width,height)). Testing needs to be done to catch this little bug
      # org_h, org_w = tens.shape[:2]
  
      if target_h > org_h or target_w > org_w:
          raise ValueError(
              "To compute centre crop, target size dimensions must be <= tens dimensions"
          )
  
      diff_h = (org_h - target_h) // 2
      diff_w = (org_w - target_w) // 2
  
      # tens[y:y+h, x:x+h]
      return to_tensor(
          tens[diff_h : diff_h + target_h, diff_w : diff_w + target_w],
          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 16 for calling a global function with example usage: _compute_centre_crop(tens, target_size) and returns: to_tensor