code: def _generate_validation_labels(ilsvrc_dir, output_file):
      synset_to_word = _synset_to_word(_synset_array_path(ilsvrc_dir))
      with open(
          _validation_file_path(ilsvrc_dir), "r"
      ) as synset_id_file, open(output_file, "w") as output:
          for synset_id in synset_id_file:
              synset_id = int(synset_id)
              output.write("%s\n" % synset_to_word[synset_id])
  
file_path: tensorflow-upstream/tensorflow/lite/tools/evaluation/tasks/imagenet_image_classification/generate_validation_labels.py
imports: import argparse
  from os import path
  import sys
  import scipy.io
label_desc: Use image node_id 4 for calling a global function with example usage: _generate_validation_labels(ilsvrc_dir, output_file) without return types