code: def xpos_vocab_factory(data, shorthand):
      if shorthand not in XPOS_DESCRIPTIONS:
          logger.warning(
              "%s is not a known dataset.  Examining the data to choose which xpos vocab to use",
              shorthand,
          )
      desc = choose_simplest_factory(data, shorthand)
      if shorthand in XPOS_DESCRIPTIONS:
          if XPOS_DESCRIPTIONS[shorthand] != desc:
              # log instead of throw
              # otherwise, updating datasets would be unpleasant
              logger.error(
                  "XPOS tagset in %s has apparently changed!  Was %s, is now %s",
                  shorthand,
                  XPOS_DESCRIPTIONS[shorthand],
                  desc,
              )
      else:
          logger.warning(
              "Chose %s for the xpos factory for %s", desc, shorthand
          )
      return build_xpos_vocab(desc, data, shorthand)
  
imports: import logging
  from stanza.models.pos.vocab import WordVocab, XPOSVocab
  from stanza.models.pos.xpos_vocab_utils import XPOSDescription, XPOSType, build_xpos_vocab, choose_simplest_factory
label_desc: Use image node_id 1 for calling a global function with example usage: xpos_vocab_factory(data, shorthand) and returns: build_xpos_vocab