code: def test_channel_shuffle(input_dtype, input_size):
      transfo = ChannelShuffle()
      input_t = torch.rand(input_size, dtype=torch.float32)
      if input_dtype == torch.uint8:
          input_t = (255 * input_t).round()
      input_t = input_t.to(dtype=input_dtype)
      out = transfo(input_t)
      assert isinstance(out, torch.Tensor)
      assert out.shape == input_size
      assert out.dtype == input_dtype
      # Ensure that nothing has changed apart from channel order
      if input_dtype == torch.uint8:
          assert torch.all(input_t.sum(0) == out.sum(0))
      else:
          # Float approximation
          assert (input_t.sum(0) - out.sum(0)).abs().mean() < 1e-7
  
file_path: doctr/tests/pytorch/test_transforms_pt.py
imports: import math
  import numpy
  import pytest
  import torch
  from doctr.transforms import ChannelShuffle, ColorInversion, GaussianNoise, RandomCrop, RandomHorizontalFlip, RandomRotate, RandomShadow, Resize
  from doctr.transforms.functional import crop_detection, rotate_sample
label_desc: Use image node_id 7 for calling a global function with example usage: test_channel_shuffle(input_dtype, input_size) without return types