code: def prepare_initial_acoustic_model(
      dir, alidir, run_opts, srand=-3, input_model=None
  ):
      """Adds the first layer; this will also add in the lda.mat and
      presoftmax_prior_scale.vec. It will also prepare the acoustic model
      with the transition model.
      If 'input_model' is specified, no initial network preparation(adding
      the first layer) is done and this model is used as initial 'raw' model
      instead of '0.raw' model to prepare '0.mdl' as acoustic model by adding the
      transition model.
      """
  
      if input_model is None:
          common_train_lib.prepare_initial_network(
              dir, run_opts, srand=srand
          )
  
      # Convert to .mdl, train the transitions, set the priors.
      common_lib.execute_command(
          """{command} {dir}/log/init_mdl.log \
                  nnet3-am-init {alidir}/final.mdl {raw_mdl} - \| \
                  nnet3-am-train-transitions - \
                  "ark:gunzip -c {alidir}/ali.*.gz|" {dir}/0.mdl
          """.format(
              command=run_opts.command,
              dir=dir,
              alidir=alidir,
              raw_mdl=(
                  input_model
                  if input_model is not None
                  else "{0}/0.raw".format(dir)
              ),
          )
      )
  
imports: import logging
  import libs.common
  import libs.nnet3.train.common
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_initial_acoustic_model(dir, alidir, run_opts, srand, input_model) without return types