code: def model_fn(features, labels, mode, params):
      builder = EstimatorSpecBuilder(features, params)
      if mode == tf.estimator.ModeKeys.PREDICT:
          return builder.build_predict_model()
      elif mode == tf.estimator.ModeKeys.EVAL:
          return builder.build_evaluation_model(labels)
      elif mode == tf.estimator.ModeKeys.TRAIN:
          return builder.build_train_model(labels)
      raise ValueError(f"Unknown mode {mode}")
  
imports: import importlib
  from typing import Any, Dict, Optional, Tuple
  import tensorflow
  from tensorflow.signal import hann_window, inverse_stft, stft
  from ..utils.tensor import pad_and_partition, pad_and_reshape
label_desc: Use image node_id 2 for calling a global function with example usage: model_fn(features, labels, mode, params) and returns: builder, builder, builder