code: def encode_data(image, label):
      """Encode both image and label as a tf.train.Example for a TFRecord."""
      encoded_image = tf.train.Feature(
          bytes_list=tf.train.BytesList(value=[image.tostring()])
      )
      encoded_label = tf.train.Feature(
          int64_list=tf.train.Int64List(value=[label])
      )
      feature_dict = {"image": encoded_image, "label": encoded_label}
      features = tf.train.Features(feature=feature_dict)
      return tf.train.Example(features=features)
  
file_path: tf-encrypted/tf_encrypted/keras/datasets/convert.py
imports: import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: encode_data(image, label) and returns: tf