code: def encode_variables(data):
      """Encodes variables using simple ordinal encoding."""
      data2 = np.copy(data)
      encoder = OrdinalEncoder()
      categorical_indices = kBytesIndices
      data2[:, categorical_indices] = encoder.fit_transform(
          data2[:, categorical_indices]
      )
      return data2
  
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 2 for calling a global function with example usage: encode_variables(data) and returns: data2