code: def align(
      dir, data, lang, run_opts, iter=None, online_ivector_dir=None
  ):
      alidir = "{dir}/ali{ali_suffix}".format(
          dir=dir,
          ali_suffix="_iter_{0}".format(iter)
          if iter is not None
          else "",
      )
  
      logger.info(
          "Aligning the data{gpu}with {num_jobs} jobs.".format(
              gpu=" using gpu " if run_opts.realign_use_gpu else " ",
              num_jobs=run_opts.realign_num_jobs,
          )
      )
      common_lib.execute_command(
          """steps/nnet3/align.sh --nj {num_jobs_align} \
                  --cmd "{align_cmd} {align_queue_opt}" \
                  --use-gpu {align_use_gpu} \
                  --online-ivector-dir "{online_ivector_dir}" \
                  --iter "{iter}" {data} {lang} {dir} {alidir}""".format(
              dir=dir,
              align_use_gpu=(
                  "yes" if run_opts.realign_use_gpu else "no"
              ),
              align_cmd=run_opts.realign_command,
              align_queue_opt=run_opts.realign_queue_opt,
              num_jobs_align=run_opts.realign_num_jobs,
              online_ivector_dir=(
                  online_ivector_dir
                  if online_ivector_dir is not None
                  else ""
              ),
              iter=iter if iter is not None else "",
              alidir=alidir,
              lang=lang,
              data=data,
          )
      )
      return alidir
  
imports: from __future__ import print_function
  from __future__ import division
  import glob
  import logging
  import math
  import os
  import random
  import time
  import libs.common
  import libs.nnet3.train.common
label_desc: Use image node_id 8 for calling a global function with example usage: align(dir, data, lang, run_opts, iter, online_ivector_dir) and returns: alidir