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 = {}
      for key in _NUMERICAL_FEATURES:
          # If sparse make it dense, setting nan's to 0 or '', and apply zscore.
          outputs[t_name(key)] = tft.scale_to_z_score(
              _fill_in_missing(inputs[key]), name=key
          )
  
      for key in _BUCKET_FEATURES:
          outputs[t_name(key)] = tf.cast(
              tft.bucketize(
                  _fill_in_missing(inputs[key]),
                  _FEATURE_BUCKET_COUNT,
                  name=key,
              ),
              dtype=tf.float32,
          )
  
      for key in _CATEGORICAL_STRING_FEATURES:
          outputs[t_name(key)] = _make_one_hot(
              _fill_in_missing(inputs[key]), key
          )
  
      for key in _CATEGORICAL_NUMERICAL_FEATURES:
          outputs[t_name(key)] = _make_one_hot(
              _fill_in_missing(inputs[key]), key
          )
  
      # Was this passenger a big tipper?
      taxi_fare = _fill_in_missing(inputs[_FARE_KEY])
      tips = _fill_in_missing(inputs[_LABEL_KEY])
      outputs[_LABEL_KEY] = tf.where(
          tf.math.is_nan(taxi_fare),
          tf.cast(tf.zeros_like(taxi_fare), tf.int64),
          # Test if the tip was > 20% of the fare.
          tf.cast(
              tf.greater(
                  tips, tf.multiply(taxi_fare, tf.constant(0.2))
              ),
              tf.int64,
          ),
      )
  
      return outputs
  
imports: from typing import List
  import absl
  from keras.callbacks import LambdaCallback
  import tensorflow
  import tensorflow_transform
  from tfx.components.trainer.executor import TrainerFnArgs
  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