code: def decode_record(record, name_to_features):
      """Decodes a record to a TensorFlow example."""
      example = tf.io.parse_single_example(record, name_to_features)
  
      # tf.Example only supports tf.int64, but the TPU only supports tf.int32.
      # So cast all int64 to int32.
      for name in list(example.keys()):
          t = example[name]
          if t.dtype == tf.int64:
              t = tf.cast(t, tf.int32)
          example[name] = t
  
      return example
  
file_path: autodist/examples/benchmark/utils/input_pipeline.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: decode_record(record, name_to_features) and returns: example