code: def create_vocabulary_single_token(
      data: Series,
      num_most_frequent: Optional[int] = None,
      processor: DataFrameEngine = PANDAS,
      unknown_symbol: str = UNKNOWN_SYMBOL,
  ):
      """Computes a vocabulary over the provided data frame.
  
      This function should be used iff the values in each row of data should be considered as a single token, e.g.,
      category features ("interested", "not interested", "somewhat interested").
  
      This assumption allows us to be more efficient than `create_vocabulary()` as we can skip tokenization and
      computing the maximum sequence length, which are unnecessary for category features.
  
      Args:
          data: Series of string data.
          num_most_frequent: Upper limit on vocabulary size.
          unknown_symbol: String representation for the UNKNOWN symbol.
          processor: Which processor to use to process data.
  
      Returns:
          Tuple of:
              vocab: List of strings representing the computed vocabulary.
              str2idx: Map of symbol to index.
              str2freq: Map of symbol to frequency.
      """
      processed_counts = data.str.strip().value_counts(sort=True)
      processed_counts = processor.compute(processed_counts)
      full_vocab = processed_counts.index.tolist()
      # Only add unknown symbol if num most frequent tokens is less than total number of unique tokens
      if num_most_frequent < len(full_vocab):
          vocab = [unknown_symbol] + full_vocab[:num_most_frequent]
      else:
          vocab = full_vocab
      str2idx = {unit: i for i, unit in enumerate(vocab)}
      str2freq = processed_counts.to_dict()
      str2freq = {k: str2freq.get(k, 0) for k in vocab}
      return vocab, str2idx, str2freq
  
imports: import logging
  import re
  import unicodedata
  from collections import Counter
  from dataclasses import dataclass
  from enum import Enum
  from typing import Dict, List, Optional, Set, Union
  import numpy
  from dateutil.parser import parse
  from ludwig.constants import PADDING_SYMBOL, START_SYMBOL, STOP_SYMBOL, UNKNOWN_SYMBOL
  from ludwig.data.dataframe.base import DataFrameEngine
  from ludwig.data.dataframe.pandas import PANDAS
  from ludwig.utils.fs_utils import open_file
  from ludwig.utils.math_utils import int_type
  from ludwig.utils.tokenizers import get_tokenizer_from_registry
  from ludwig.utils.types import Series
label_desc: Use image node_id 21 for calling a global function with example usage: create_vocabulary_single_token(data, num_most_frequent, processor, unknown_symbol) and returns: vocab,  str2idx,  str2freq