code: def choose_simplest_factory(data, shorthand):
      logger.info(f"Original length = {len(data)}")
      data = filter_data(data, idx=2)
      logger.info(f"Filtered length = {len(data)}")
      vocab = WordVocab(data, shorthand, idx=2, ignore=["_"])
      key = DEFAULT_KEY
      best_size = len(vocab) - len(VOCAB_PREFIX)
      if best_size > 20:
          for sep in ["", "-", "+", "|", ",", ":"]:  # separators
              vocab = XPOSVocab(data, shorthand, idx=2, sep=sep)
              length = sum(
                  len(x) - len(VOCAB_PREFIX)
                  for x in vocab._id2unit.values()
              )
              if length < best_size:
                  key = XPOSDescription(XPOSType.XPOS, sep)
                  best_size = length
      return key
  
file_path: stanza/stanza/models/pos/xpos_vocab_utils.py
imports: from collections import namedtuple
  from enum import Enum
  import logging
  import os
  from stanza.models.common.vocab import VOCAB_PREFIX
  from stanza.models.pos.vocab import XPOSVocab, WordVocab
label_desc: Use image node_id 2 for calling a global function with example usage: choose_simplest_factory(data, shorthand) and returns: key