code: def create_temporary_vocab_file(words, counts=None):
      """
      Creates a temporary vocabulary file.
  
      Args:
        words: List of words in the vocabulary
  
      Returns:
        A temporary file object with one word per line
      """
      vocab_file = tempfile.NamedTemporaryFile()
      if counts is None:
          for token in words:
              vocab_file.write((token + "\n").encode("utf-8"))
      else:
          for token, count in zip(words, counts):
              vocab_file.write(
                  "{}\t{}\n".format(token, count).encode("utf-8")
              )
      vocab_file.flush()
      return vocab_file
  
file_path: seq2seq/seq2seq/test/utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import tempfile
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: create_temporary_vocab_file(words, counts) and returns: vocab_file