class_docstr: A mapping from symbols to consecutive integers
class_docstr_tok: ["A","mapping","from","symbols","to","consecutive","integers"]
code: def build_vocab_file_if_nonexistent(
      cls,
      corpus_files: List[str],
      vocab_file: str,
      max_vocab_size: int,
      tokens_with_penalty: Optional[str] = None,
      is_char_vocab: bool = False,
      embed_bytes: bool = False,
      padding_factor: int = 8,
  ) -> (
      "Dictionary"
  ):  # https://www.python.org/dev/peps/pep-0484/#forward-references
      if PathManager.isfile(vocab_file):
          d = cls.load(vocab_file)
          print(
              f"Re-using existing vocab file {vocab_file}. Specified "
              f"max vocab size of {max_vocab_size} may not be enforced."
          )
          return d
  
      print(
          f"Vocab file {vocab_file} does not exist. "
          "Creating new vocab file at that path."
      )
      return cls.build_vocab_file(
          corpus_files=corpus_files,
          vocab_file=vocab_file,
          max_vocab_size=max_vocab_size,
          tokens_with_penalty=tokens_with_penalty,
          is_char_vocab=is_char_vocab,
          embed_bytes=embed_bytes,
          padding_factor=padding_factor,
      )
  
imports: import os
  import re
  from typing import Dict, List, Optional, Set
  from fairseq.data import dictionary
  from fairseq.file_io import PathManager
  from pytorch_translate import vocab_constants
label_desc: Use image node_id 4 for calling the Dictionary obj's underlying member method code with example usage: obj.build_vocab_file_if_nonexistent(cls, corpus_files, vocab_file, max_vocab_size, tokens_with_penalty, is_char_vocab, embed_bytes, padding_factor) and returns: cls, d