code: def from_config(cls, config, use_bos, use_eos):
      return cls(
          config.accept_flat_intents_slots,
          config.factor,
          use_bos,
          use_eos,
      )
  
imports: from typing import Dict, List, Optional, Set
  import numpy
  from pytext.common.constants import SpecialTokens, Token
  from pytext.config.component import Component, ComponentType
  from pytext.config.pytext_config import ConfigBase
  from pytext.data.data_structures.annotation import Annotation, Intent, Root, Slot
  from pytext.data.utils import VocabBuilder, Vocabulary
label_desc: Use image node_id 1 for calling the TreeMask obj's underlying member method code with example usage: obj.from_config(cls, config, use_bos, use_eos) and returns: cls