code: def test_unpad_xyxy_bboxes():
      bboxes1 = torch.rand((1, 32, 4))
      bboxes2 = torch.rand((1, 32, 4, 20))
  
      pad = [2, 3, 4, 5]
      bboxes1_unpad = unpad_xyxy_bboxes(bboxes1, pad, dim=-1)
      assert bboxes1_unpad.size(0) == 1
      assert bboxes1_unpad.size(1) == 32
      assert bboxes1_unpad.size(2) == 4
  
      bboxes2_unpad = unpad_xyxy_bboxes(bboxes2, pad, dim=2)
      assert bboxes2_unpad.size(0) == 1
      assert bboxes2_unpad.size(1) == 32
      assert bboxes2_unpad.size(2) == 4
      assert bboxes2_unpad.size(3) == 20
  
imports: import numpy
  import pytest
  import torch
  from pytorch_toolbelt.inference.functional import unpad_xyxy_bboxes, pad_image_tensor, unpad_image_tensor, pad_tensor_to_size
  from pytorch_toolbelt.modules.encoders import make_n_channel_input
  from pytorch_toolbelt.utils import match_bboxes, match_bboxes_hungarian, get_collate_for_dataset
  from torch import nn
  from torch.utils.data import ConcatDataset
  from functools import partial
label_desc: Use image node_id 4 for calling a global function with example usage: test_unpad_xyxy_bboxes() without return types