docstr: Add a logger to the xpos factory logger so that it will throw an assertion instead of logging an error
  
  We don't actually want assertions, since that would be a huge
  pain in the event one of the models actually changes, so
  instead we just logger.error in the factory.  Using this
  handler is a simple way to check that the error is correctly
  logged when something changes
docstr_tok: ["Add","a","logger","to","the","xpos","factory","logger","so","that","it","will","throw","an","assertion","instead","of","logging","an","error","We","do","n't","actually","want","assertions",",","since","that","would","be","a","huge","pain","in","the","event","one","of","the","models","actually","changes",",","so","instead","we","just","logger.error","in","the","factory",".","Using","this","handler","is","a","simple","way","to","check","that","the","error","is","correctly","logged","when","something","changes"]
code: def setup_class(cls):
      """
      Add a logger to the xpos factory logger so that it will throw an assertion instead of logging an error
  
      We don't actually want assertions, since that would be a huge
      pain in the event one of the models actually changes, so
      instead we just logger.error in the factory.  Using this
      handler is a simple way to check that the error is correctly
      logged when something changes
      """
      logger.info(
          "About to start xpos_vocab_factory tests - logger.error in that module will now cause AssertionError"
      )
  
      handler = ErrorFatalHandler()
      logger.addHandler(handler)
  
imports: import pytest
  import logging
  import os
  import tempfile
  from stanza.models import tagger
  from stanza.models.common import pretrain
  from stanza.models.pos.data import Dataset
  from stanza.models.pos.trainer import Trainer
  from stanza.models.pos.vocab import WordVocab, XPOSVocab
  from stanza.models.pos.xpos_vocab_factory import xpos_vocab_factory
  from stanza.models.pos.xpos_vocab_utils import XPOSDescription, XPOSType, build_xpos_vocab, choose_simplest_factory
  from stanza.utils.conll import CoNLL
  from stanza.tests import TEST_WORKING_DIR
label_desc: Use image node_id 1 for calling the TestXPOSVocabFactory obj's underlying member method code with example usage: obj.setup_class(cls) without return types