code: def reorder(input, seq_len, reorders, persample_reorder=True):
      """
      Reorder the whole batch of sequences according to `reorders`
      reorders is one list with new order or list of new_orders depending on `persample_reorder`
      """
      result = []
      for i, sample in enumerate(input):
          order = reorders[i] if persample_reorder else reorders
          result.append(reorder_sample(sample, seq_len, order))
      return result
  
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 4 for calling a global function with example usage: reorder(input, seq_len, reorders, persample_reorder) and returns: result