code: def _read_vocab_file(vocab_path, min_count):
      """Loads a vocabulary from the given path.
  
      Args:
          vocab_path (str): Path to utf-8 text file containing vocabulary.
              Each token should be on a line, may followed with a count number
              seperate by space if `with_count`. No extra whitespace is allowed.
          min_count (int): retains only tokens with min_count frequency.
      """
  
      if not os.path.exists(vocab_path):
          raise RuntimeError(
              "Vocabulary not found at {}".format(vocab_path)
          )
      else:
          with codecs.open(vocab_path, "rb") as f:
              lines = [
                  line.decode("utf-8") for line in f.read().split(b"\n")
              ]
              lines = lines[:-1]
  
              first_line = lines[0].split(None, 1)
              has_count = (
                  len(first_line) == 2 and first_line[-1].isdigit()
              )
              if has_count:
                  vocab = []
                  for line in lines:
                      if int(line.split(None, 1)[1]) >= min_count:
                          vocab.append(line.split(None, 1)[0])
              else:
                  vocab = lines
              return vocab
  
file_path: OpenNMT-py/onmt/inputters/inputter.py
imports: import os
  from math import ceil
  import codecs
  import pyonmttok
  from onmt.constants import DefaultTokens
label_desc: Use image node_id 2 for calling a global function with example usage: _read_vocab_file(vocab_path, min_count) and returns: vocab