code: def test_sequence_rearrange():
      for dev in ["cpu", "gpu"]:
          for shape in [[4, 3, 2], [5, 1]]:
              for new_order, per_sample in [order_0, order_1, order_2]:
                  for layout in ["FHW"[: len(shape)], ""]:
                      yield check_sequence_rearrange, 5, shape, new_order, per_sample, dev, layout
  
file_path: DALI/dali/test/python/operator_2/test_sequence_rearrange.py
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.fn
  import numpy
  from nose_utils import raises
label_desc: Use image node_id 7 for calling a global function with example usage: test_sequence_rearrange() without return types