code: def write_vocabulary_file(vocabulary):
      """Write temporary vocab file for module construction."""
      tmpdir = tempfile.mkdtemp()
      vocabulary_file = os.path.join(tmpdir, "tokens.txt")
      with gfile.GFile(vocabulary_file, "w") as f:
          for entry in vocabulary:
              f.write(entry + "\n")
      return vocabulary_file
  
file_path: tensorflow-upstream/tensorflow/core/tfrt/saved_model/tests/gen_hash_table_asset_v1.py
imports: import os
  import shutil
  import tempfile
  from absl import app
  from absl import flags
  from tensorflow.python.client import session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.ops import resource_variables_toggle
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import gfile
  from tensorflow.python.saved_model import builder
  from tensorflow.python.saved_model import signature_constants
  from tensorflow.python.saved_model import signature_def_utils
  from tensorflow.python.saved_model import tag_constants
  from tensorflow.python.saved_model import utils
label_desc: Use image node_id 1 for calling a global function with example usage: write_vocabulary_file(vocabulary) and returns: vocabulary_file