code: def determine_tsv_file(
      filename: str, data_folder: Path, cut_multisense: bool = True
  ) -> str:
      """Checks if the converted .tsv file already exists and if not, creates it.
  
      Args:
          filename: The name of the file.
          data_folder: The name of the folder in which the CoNLL file should reside.
          cut_multisense: Determines whether the wn30_key tag should be cut if it contains multiple possible senses.
              If True only the first listed sense will be used. Otherwise, the whole list of senses will be detected
              as one new sense. The default is True.
  
      Returns:
          the name of the file.
      """
      if cut_multisense is True and filename not in [
          "semeval2007task17",
          "trainomatic",
          "wngt",
      ]:  # these three datasets do not have multiple senses
          conll_file_name = filename + "_cut.tsv"
  
      else:
          conll_file_name = filename + ".tsv"
  
      path_to_conll_file = data_folder / conll_file_name
  
      if not path_to_conll_file.exists():
          # convert the file to CoNLL
  
          from_ufsac_to_tsv(
              xml_file=Path(
                  data_folder / "original_data" / (filename + ".xml")
              ),
              conll_file=Path(data_folder / conll_file_name),
              datasetname=filename,
              cut_multisense=cut_multisense,
          )
  
      return conll_file_name
  
imports: import csv
  import logging
  import os
  from pathlib import Path
  from typing import Dict, List, Optional, Union
  import requests
  import flair
  from flair.data import Corpus, MultiCorpus, Sentence
  from flair.datasets.sequence_labeling import ColumnCorpus, MultiFileColumnCorpus
  from flair.file_utils import cached_path, unpack_file
  from flair.splitter import SegtokSentenceSplitter, SentenceSplitter
label_desc: Use image node_id 2 for calling a global function with example usage: determine_tsv_file(filename, data_folder, cut_multisense) and returns: conll_file_name