code: def make_model_fn(head, optimizer, feature_columns):
      """Constructs and returns a model_fn using supplied head."""
  
      def model_fn(
          features, labels, mode, params, config=None
      ):  # pylint: disable=unused-argument
          feature_layer = tf.keras.layers.DenseFeatures(feature_columns)
          inputs = feature_layer(features)
          hidden_layer = tf.keras.layers.Dense(
              units=3, activation="relu"
          )
          hidden_layer_values = hidden_layer(inputs)
          logits_layer = tf.keras.layers.Dense(
              units=head.logits_dimension, activation=None
          )
          logits = logits_layer(hidden_layer_values)
          return head.create_estimator_spec(
              features=features,
              labels=labels,
              mode=mode,
              logits=logits,
              optimizer=optimizer,
          )
  
      return model_fn
  
file_path: privacy/tensorflow_privacy/privacy/estimators/v1/head_test.py
imports: from absl.testing import parameterized
  import tensorflow
  from tensorflow_privacy.privacy.estimators import test_utils
  from tensorflow_privacy.privacy.estimators.v1 import head
  from tensorflow_privacy.privacy.optimizers.dp_optimizer import DPGradientDescentGaussianOptimizer
  from tensorflow_estimator.python.estimator import estimator
label_desc: Use image node_id 1 for calling a global function with example usage: make_model_fn(head, optimizer, feature_columns) and returns: model_fn, head