code: def make_learner(tokenization_type, symbols):
      if tokenization_type == "bpe":
          # BPE training
          learner = pyonmttok.BPELearner(
              tokenizer=None, symbols=symbols
          )
      elif tokenization_type == "sentencepiece":
          # SentencePiece training
          learner = pyonmttok.SentencePieceLearner(
              vocab_size=symbols, character_coverage=0.98
          )
      return learner
  
imports: import os
  import copy
  import multiprocessing
  import pyonmttok
  from functools import partial
  from onmt.utils.logging import init_logger, logger
  from onmt.utils.misc import set_random_seed, check_path
  from onmt.utils.parse import ArgumentParser
  from onmt.opts import data_prepare_opts
  from onmt.inputters.text_corpus import build_corpora_iters, get_corpora
  from onmt.inputters.text_utils import process, append_features_to_text
  from onmt.transforms import make_transforms, get_transforms_cls
  from onmt.constants import CorpusName, CorpusTask
  from collections import Counter
label_desc: Use image node_id 6 for calling a global function with example usage: make_learner(tokenization_type, symbols) and returns: learner