code: def character_based():
      is_character_based = False
      if FLAGS.scorer_path:
          scorer = Scorer(
              FLAGS.lm_alpha,
              FLAGS.lm_beta,
              FLAGS.scorer_path,
              Config.alphabet,
          )
          is_character_based = scorer.is_utf8_mode()
      return is_character_based
  
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 1 for calling a global function with example usage: character_based() and returns: is_character_based