code: def find_treebank_dataset_file(
      treebank,
      udbase_dir,
      dataset,
      extension,
      fail=False,
      env_var="UDBASE",
  ):
      """
      For a given treebank, dataset, extension, look for the exact filename to use.
  
      Sometimes the short name we use is different from the short name
      used by UD.  For example, Norwegian or Chinese.  Hence the reason
      to not hardcode it based on treebank
  
      set fail=True to fail if the file is not found
      """
      if treebank.startswith("UD_Korean") and treebank.endswith("_seg"):
          treebank = treebank[:-4]
      filename = os.path.join(
          udbase_dir, treebank, f"*-ud-{dataset}.{extension}"
      )
      files = glob.glob(filename)
      if len(files) == 0:
          if fail:
              raise FileNotFoundError(
                  "Could not find any treebank files which matched {}\nIf you have the data elsewhere, you can change the base directory for the search by changing the {} environment variable".format(
                      filename, env_var
                  )
              )
          else:
              return None
      elif len(files) == 1:
          return files[0]
      else:
          raise RuntimeError(
              f"Unexpected number of files matched '{udbase_dir}/{treebank}/*-ud-{dataset}.{extension}'"
          )
  
imports: import argparse
  from enum import Enum
  import glob
  import logging
  import os
  import re
  import subprocess
  import sys
  from stanza.models.common.short_name_to_treebank import canonical_treebank_name
  import stanza.utils.datasets.prepare_tokenizer_data
  import stanza.utils.default_paths
label_desc: Use image node_id 9 for calling a global function with example usage: find_treebank_dataset_file(treebank, udbase_dir, dataset, extension, fail, env_var) and returns: None, files