code: def test_linear_transformation(device, tmpdir):
      c, h, w = 3, 24, 32
  
      tensor, _ = _create_data(h, w, channels=c, device=device)
  
      matrix = torch.rand(c * h * w, c * h * w, device=device)
      mean_vector = torch.rand(c * h * w, device=device)
  
      fn = T.LinearTransformation(matrix, mean_vector)
      scripted_fn = torch.jit.script(fn)
  
      _test_transform_vs_scripted(fn, scripted_fn, tensor)
  
      batch_tensors = torch.rand(4, c, h, w, device=device)
      # We skip some tests from _test_transform_vs_scripted_on_batch as
      # results for scripted and non-scripted transformations are not exactly the same
      torch.manual_seed(12)
      transformed_batch = fn(batch_tensors)
      torch.manual_seed(12)
      s_transformed_batch = scripted_fn(batch_tensors)
      assert_equal(transformed_batch, s_transformed_batch)
  
      scripted_fn.save(os.path.join(tmpdir, "t_norm.pt"))
  
imports: import os
  import sys
  import numpy
  import PIL.Image
  import pytest
  import torch
  from common_utils import _assert_approx_equal_tensor_to_pil, _assert_equal_tensor_to_pil, _create_data, _create_data_batch, assert_equal, cpu_and_cuda, float_dtypes, get_tmp_dir, int_dtypes
  from torchvision import transforms
  from torchvision.transforms import functional, InterpolationMode
  from torchvision.transforms.autoaugment import _apply_op
label_desc: Use image node_id 40 for calling a global function with example usage: test_linear_transformation(device, tmpdir) without return types