code: def _generate_tags(encoding_type, number_labels=4):
      """
  
      :param encoding_type: 例如BIOES, BMES, BIO等
      :param number_labels: 多少个label，大于1
      :return:
      """
      vocab = {}
      for i in range(number_labels):
          label = str(i)
          for tag in encoding_type:
              if tag == "O":
                  if tag not in vocab:
                      vocab["O"] = len(vocab) + 1
                  continue
              vocab["{}-{}".format(tag, label)] = (
                  len(vocab) + 1
              )  # 其实表达的是这个的count
      return vocab
  
imports: import pytest
  from collections import Counter
  import os, sys
  import copy
  from functools import partial
  import numpy
  import socket
  from fastNLP.core.vocabulary import Vocabulary
  from fastNLP.core.metrics import SpanFPreRecMetric
  from fastNLP.core.dataset import DataSet
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from .utils import find_free_network_port, setup_ddp
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_tags(encoding_type, number_labels) and returns: vocab