code: def main(_):
      initialize_globals()
  
      if not FLAGS.test_files:
          log_error(
              "You need to specify what files to use for evaluation via "
              "the --test_files flag."
          )
          sys.exit(1)
  
      is_character_based = character_based()
  
      study = optuna.create_study()
      study.set_user_attr("is_character_based", is_character_based)
      study.optimize(objective, n_jobs=1, n_trials=FLAGS.n_trials)
      print(
          "Best params: lm_alpha={} and lm_beta={} with WER={}".format(
              study.best_params["lm_alpha"],
              study.best_params["lm_beta"],
              study.best_value,
          )
      )
  
file_path: DeepSpeech/lm_optimizer.py
imports: from __future__ import absolute_import, print_function
  import absl.app
  import optuna
  import sys
  import tensorflow.compat.v1
  from deepspeech_training.evaluate import evaluate
  from deepspeech_training.train import create_model
  from deepspeech_training.util.config import Config, initialize_globals
  from deepspeech_training.util.flags import create_flags, FLAGS
  from deepspeech_training.util.logging import log_error
  from deepspeech_training.util.evaluate_tools import wer_cer_batch
  from ds_ctcdecoder import Scorer
label_desc: Use image node_id 3 for calling a global function with example usage: main(_) without return types