code: def _decode_tfexample(serialized_example):
      """Decodes saved, serialized tfrecord example."""
      eg = tf.train.Example.FromString(serialized_example)
      return {
          # add [0] after "value" if you want to just get value "1" instead of ["1"]
          "class": np.reshape(
              eg.features.feature["class"].int64_list.value, [1]
          )
          .astype(np.int64)
          .tolist(),
          "seq_len": eg.features.feature["seq_len"].int64_list.value[0],
          "sequence": np.reshape(
              eg.features.feature["sequence"].float_list.value,
              [51 * 10],
          )
          .astype(np.float32)
          .tolist(),
          "rendered": np.reshape(
              eg.features.feature["rendered"].float_list.value,
              [64 * 64],
          )
          .astype(np.float32)
          .tolist(),
      }
  
imports: from absl import app
  from absl import flags
  import apache_beam
  from magenta.models.svg_vae import svg_utils
  import numpy
  from tensor2tensor.data_generators import generator_utils
  import tensorflow.compat.v1
label_desc: Use image node_id 5 for calling a global function with example usage: _decode_tfexample(serialized_example) and returns: dict