code: def record_parse_stl10_32(
      index: int, record: str, image_shape: Tuple[int, int, int]
  ):
      features = tf.io.parse_single_example(
          record,
          features={
              "image": tf.io.FixedLenFeature([], tf.string),
              "label": tf.io.FixedLenFeature([], tf.int64),
          },
      )
      image = tf.image.decode_image(features["image"])
      image = tf.cast(image, tf.float32) * (2.0 / 255) - 1.0
      image = tf.nn.avg_pool2d([image], 3, 3, "VALID")[0]
      image.set_shape(image_shape)
      return dict(index=index, image=image, label=features["label"])
  
imports: import os
  from typing import Callable, Optional, Tuple, List, Iterable
  import numpy
  import tensorflow
  from absl import flags
label_desc: Use image node_id 4 for calling a global function with example usage: record_parse_stl10_32(index, record, image_shape) and returns: dict