code: def get_best_nnet_model(
      dir, iter, best_model_index, run_opts, get_raw_nnet_from_am=True
  ):
      best_model = "{dir}/{next_iter}.{best_model_index}.raw".format(
          dir=dir, next_iter=iter + 1, best_model_index=best_model_index
      )
  
      if get_raw_nnet_from_am:
          out_model = """- \| nnet3-am-copy --set-raw-nnet=- \
                          {dir}/{iter}.mdl {dir}/{next_iter}.mdl""".format(
              dir=dir, iter=iter, next_iter=iter + 1
          )
      else:
          out_model = "{dir}/{next_iter}.raw".format(
              dir=dir, next_iter=iter + 1
          )
  
      common_lib.execute_command(
          """{command} {dir}/log/select.{iter}.log \
                  nnet3-copy {best_model} \
                  {out_model}""".format(
              command=run_opts.command,
              dir=dir,
              iter=iter,
              best_model=best_model,
              out_model=out_model,
          )
      )
  
imports: from __future__ import division
  import argparse
  import glob
  import logging
  import os
  import math
  import re
  import shutil
  import libs.common
  from libs.nnet3.train.dropout_schedule import *
  import unittest
label_desc: Use image node_id 5 for calling a global function with example usage: get_best_nnet_model(dir, iter, best_model_index, run_opts, get_raw_nnet_from_am) without return types