human
2. Create model_fn

Use feature columns to create input_layer
Use tf.keras.layers to define the model architecutre and output
Use binary_classification_head for create EstimatorSpec
assistant
#Here is the Python code you requested.
from tensorflow.python.ops import math_ops

def find_learning_rate(params):
    
    training_step = tf.cast(tf.train.get_global_step(), tf.float32)
    factor = tf.cast(tf.multiply(1.e-5, training_step*training_step), tf.float32)
    learning_rate = tf.add(params.learning_rate, factor)
    return learning_rate
    

def update_learning_rate(params):
    
    training_step = tf.cast(tf.train.get_global_step(), tf.int32)
    base_cycle = tf.floordiv(training_step, params.cycle_length)
    current_cycle = tf.cast(tf.round(tf.sqrt(tf.cast(base_cycle, tf.float32))) + 1, tf.int32)
    current_cycle_length = tf.cast(tf.multiply(current_cycle, params.cycle_length), tf.int32)
    cycle_step = tf.mod(training_step, current_cycle_length)

    learning_rate = tf.cond(
        tf.equal(cycle_step, 0),
        lambda: params.learning_rate,
        lambda: tf.train.cosine_decay(
            learning_rate=params.learning_rate,
            global_step=cycle_step,
            decay_steps=current_cycle_length,
            alpha=0.0,
        )
    )
    
    tf.summary.scalar('base_cycle', base_cycle)
    tf.summary.scalar('current_cycle', current_cycle)
    tf.summary.scalar('current_cycle_length', current_cycle_length)
    tf.summary.scalar('cycle_step', cycle_step)
    tf.summary.scalar('learning_rate', learning_rate)

    return learning_rate

def model_fn(features, labels, mode, params):
    
    is_training = True if mode == tf.estimator.ModeKeys.TRAIN else False
    
    # model body
    def _inference(features, mode, params):
        
        feature_columns = create_feature_columns()
        input_layer = tf.feature_column.input_layer(features=features, feature_columns=feature_columns)
        dense_inputs = input_layer
        for i in range(len(params.hidden_units)):
            dense = tf.keras.layers.Dense(params.hidden_units[i], activation='relu')(dense_inputs)
            dense_dropout = tf.keras.layers.Dropout(params.dropout_prob)(dense, training=is_training)
            dense_inputs = dense_dropout
       ...