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 features.DENSE_FLOAT_FEATURE_KEYS:
          # If sparse make it dense, setting nan's to 0 or '', and apply zscore.
          outputs[
              features.transformed_name(key)
          ] = tft.scale_to_z_score(_fill_in_missing(inputs[key]))
  
      for key in features.VOCAB_FEATURE_KEYS:
          # Build a vocabulary for this feature.
          outputs[
              features.transformed_name(key)
          ] = tft.compute_and_apply_vocabulary(
              _fill_in_missing(inputs[key]),
              top_k=features.VOCAB_SIZE,
              num_oov_buckets=features.OOV_SIZE,
          )
  
      for key, num_buckets in zip(
          features.BUCKET_FEATURE_KEYS,
          features.BUCKET_FEATURE_BUCKET_COUNT,
      ):
          outputs[features.transformed_name(key)] = tft.bucketize(
              _fill_in_missing(inputs[key]), num_buckets
          )
  
      for key in features.CATEGORICAL_FEATURE_KEYS:
          outputs[features.transformed_name(key)] = _fill_in_missing(
              inputs[key]
          )
  
      # Was this passenger a big tipper?
      taxi_fare = _fill_in_missing(inputs[features.FARE_KEY])
      tips = _fill_in_missing(inputs[features.LABEL_KEY])
      outputs[features.transformed_name(features.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: import tensorflow
  import tensorflow_transform
  from tfx.experimental.templates.taxi.models import features
label_desc: Use image node_id 2 for calling a global function with example usage: preprocessing_fn(inputs) and returns: outputs