code: def test_transpose_vs_numpy():
      for device in ["cpu", "gpu"]:
          for batch_size in [1, 3, 10, 100]:
              for dim in range(2, 5):
                  for permutation in all_permutations(dim):
                      yield check_transpose_vs_numpy, device, batch_size, dim, 1000000, permutation
  
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  from nvidia.dali import fn, pipeline_def
  import math
  from test_utils import compare_pipelines, as_array, RandomDataIterator, RandomlyShapedDataIterator
  import itertools
  from nose2.tools import params
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: test_transpose_vs_numpy() without return types