code: def encoding_function(x, label_path):
      """Matches a label's name with the index from the labels.txt file"""
      # Open label file and get indices
      with tf.io.gfile.GFile(label_path, "r") as f:
          labels = [l.strip().split(" ")[0] for l in f.readlines()]
      return labels.index(x.decode("utf-8"))
  
file_path: tcav/tcav/tcav_examples/discrete/kdd99_model.py
imports: from __future__ import division
  from __future__ import print_function
  import os
  import tensorflow
  import argparse
  import numpy
  from sklearn.model_selection import train_test_split
  import sklearn.datasets
  from sklearn.preprocessing import OrdinalEncoder
label_desc: Use image node_id 3 for calling a global function with example usage: encoding_function(x, label_path) and returns: labels