code: def load_or_create_vocab(
      data: Iterable[str],
      vocab_path: Optional[str],
      num_words: int,
      word_min_count: int,
      pad_to_multiple_of: Optional[int] = None,
      mapper: Callable = map,
  ) -> Vocab:
      """
      If the vocabulary path is defined, the vocabulary is loaded from the path.
      Otherwise, it is built from the data file. No writing to disk occurs.
  
      :param data: Tuple of file paths for each shard.
      """
      if vocab_path is None:
          return build_from_paths(
              paths=data,
              num_words=num_words,
              min_count=word_min_count,
              pad_to_multiple_of=pad_to_multiple_of,
              mapper=mapper,
          )
      else:
          return vocab_from_json(vocab_path)
  
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 15 for calling a global function with example usage: load_or_create_vocab(data, vocab_path, num_words, word_min_count, pad_to_multiple_of, mapper) and returns: build_from_paths, vocab_from_json