code: def unpad_image_tensor(image_tensor: Tensor, pad) -> Tensor:
      if len(image_tensor.size()) != 4:
          raise ValueError("Tensor must have rank 4 ([B,C,H,W])")
  
      pad_left, pad_right, pad_top, pad_btm = pad
      rows, cols = image_tensor.size(2), image_tensor.size(3)
      return image_tensor[
          ..., pad_top : rows - pad_btm, pad_left : cols - pad_right
      ]
  
imports: import itertools
  from collections.abc import Sized, Iterable
  from typing import Union, Tuple
  import torch
  from torch import Tensor
  from ..utils.support import pytorch_toolbelt_deprecated
label_desc: Use image node_id 20 for calling a global function with example usage: unpad_image_tensor(image_tensor, pad) and returns: image_tensor