code: def unpad_xyxy_bboxes(bboxes_tensor: torch.Tensor, pad, dim=-1):
      pad_left, pad_right, pad_top, pad_btm = pad
      pad = torch.tensor(
          [pad_left, pad_top, pad_left, pad_top],
          dtype=bboxes_tensor.dtype,
      ).to(bboxes_tensor.device)
  
      if dim == -1:
          dim = len(bboxes_tensor.size()) - 1
  
      expand_dims = list(set(range(len(bboxes_tensor.size()))) - {dim})
      for i, dim in enumerate(expand_dims):
          pad = pad.unsqueeze(dim)
  
      return bboxes_tensor - pad
  
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 21 for calling a global function with example usage: unpad_xyxy_bboxes(bboxes_tensor, pad, dim) and returns: unknown