code: def preprocessing_fn(inputs):
      """tf.transform's callback function for preprocessing inputs.
  
      Args:
        inputs: map from feature keys to raw not-yet-transformed features.
  
      Returns:
        Map from string feature key to transformed feature operations.
      """
      outputs = {}
  
      # The input float values for the image encoding are in the range [-0.5, 0.5].
      # So scale_by_min_max is a identity operation, since the range is preserved.
      outputs[transformed_name(IMAGE_KEY)] = tft.scale_by_min_max(
          inputs[IMAGE_KEY], -0.5, 0.5
      )
      # TODO(b/157064428): Support label transformation for Keras.
      # Do not apply label transformation as it will result in wrong evaluation.
      outputs[transformed_name(LABEL_KEY)] = inputs[LABEL_KEY]
  
      return outputs
  
file_path: tfx/tfx/examples/mnist/mnist_utils_native_keras_base.py
imports: from typing import List
  import absl
  import tensorflow
  import tensorflow_transform
  from tfx.components.trainer.fn_args_utils import DataAccessor
  from tfx_bsl.tfxio import dataset_options
label_desc: Use image node_id 4 for calling a global function with example usage: preprocessing_fn(inputs) and returns: outputs