code: def build_vocab(
      data: Iterable[str],
      num_words: Optional[int] = None,
      min_count: int = 1,
      pad_to_multiple_of: Optional[int] = None,
  ) -> Vocab:
      """
      Creates a vocabulary mapping from words to ids. Increasing integer ids are assigned by word frequency,
      using lexical sorting as a tie breaker. The only exception to this are special symbols such as the padding symbol
      (PAD).
  
      :param data: Sequence of sentences containing whitespace-delimited tokens.
      :param num_words: Optional maximum number of words in the vocabulary.
      :param min_count: Minimum occurrences of words to be included in the vocabulary.
      :param pad_to_multiple_of: If not None, pads the vocabulary to a size that is the next multiple of this int.
      :return: Word-to-id mapping.
      """
      raw_vocab = count_tokens(data)
      return build_pruned_vocab(
          raw_vocab=raw_vocab,
          num_words=num_words,
          min_count=min_count,
          pad_to_multiple_of=pad_to_multiple_of,
      )
  
imports: import argparse
  import json
  import logging
  import os
  from collections import Counter
  from itertools import chain, islice
  from typing import Dict, Iterable, List, Optional, Tuple, Callable
  from sockeye.log import setup_main_logger
  from .None import constants
  from .None import utils
label_desc: Use image node_id 3 for calling a global function with example usage: build_vocab(data, num_words, min_count, pad_to_multiple_of) and returns: build_pruned_vocab