class_docstr: Tensorizer for token level classification tasks such as NER, POS etc
  using RoBERTa. Here each token has an associated label and the tensorizer
  should output a label tensor as well. The input for this tensorizer comes
  from the CoNLLUNERDataSource data source.
code: def __init__(
      self,
      columns,
      tokenizer=None,
      vocab=None,
      max_seq_len=256,
      labels_columns=Config.labels_columns,
      labels=Config.labels,
  ) -> None:
      assert (
          len(columns) == 1
      ), "Only support single sentences for token level tasks."
      assert len(labels) >= 1, "Label set should not be empty."
      super().__init__(
          columns=columns,
          tokenizer=tokenizer,
          max_seq_len=max_seq_len,
          vocab=vocab,
      )
      self.labels = labels
      self.labels_columns = labels_columns
      self.labels_vocab = self._build_label_vocab(labels)
      self.labels_pad_idx = self.labels_vocab.get_pad_index()
  
imports: import itertools
  from typing import Any, Dict, List, Tuple
  import torch
  from pytext import resources
  from pytext.common.constants import SpecialTokens
  from pytext.config.component import ComponentType, create_component
  from pytext.data.bert_tensorizer import BERTTensorizerBase, BERTTensorizerBaseScriptImpl, build_fairseq_vocab
  from pytext.data.tokenizers import GPT2BPETokenizer, Tokenizer
  from pytext.data.utils import pad_and_tensorize, VocabBuilder, Vocabulary
  from pytext.torchscript.tensorizer import ScriptRoBERTaTensorizer
  from pytext.torchscript.vocab import ScriptVocabulary
  from pytext.utils.file_io import PathManager
label_desc: Use image node_id 2 to create a new RoBERTaTokenLevelTensorizer object from inherited base classes: RoBERTaTensorizer with example: obj = RoBERTaTokenLevelTensorizer(columns, tokenizer, vocab, max_seq_len, labels_columns, labels)