code: def move_dimension_to_the_front(tensor, dim_index):
      all_dims = list(range(tensor.ndim))
      return tensor.permute(
          *(
              [dim_index]
              + all_dims[:dim_index]
              + all_dims[dim_index + 1 :]
          )
      )
  
file_path: NeMo/nemo/collections/asr/metrics/wer.py
imports: from typing import List, Tuple, Union
  import editdistance
  import jiwer
  import torch
  from torchmetrics import Metric
  from nemo.collections.asr.parts.submodules.ctc_decoding import AbstractCTCDecoding
  from nemo.collections.asr.parts.submodules.rnnt_decoding import AbstractRNNTDecoding
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: move_dimension_to_the_front(tensor, dim_index) and returns: tensor