code: def train(train_x_df, train_y_df):
      """Train a logistic regressor on the dataset."""
      x = list(train_x_df.columns.values)
      model = build_model(len(x))
  
      os.makedirs("./saved_models", exist_ok=True)
  
      cp_callback = keras.callbacks.ModelCheckpoint(
          checkpoint_path,
          save_weights_only=True,
          save_best_only=True,
          verbose=1,
      )
  
      # first 80 percent for training
      train_x = train_x_df[1:246005]
      train_y = train_y_df[1:246005]
  
      # other 20 percent for evaluating
      eval_x = train_x_df[246006 : len(train_x_df) - 1]
      eval_y = train_y_df[246006 : len(train_y_df) - 1]
  
      # train model
      model.fit(
          train_x,
          train_y,
          epochs=epochs,
          validation_split=0.2,
          verbose=0,
          batch_size=batch_size,
          callbacks=[cp_callback],
      )
  
      print("done training")
  
      # export the tensorflow model to a onnx model file
      # for loading in tfe and secure enclave
      export_to_onnx(
          x,
          model,
          "./house_credit_default.onnx",
      )
  
      # evaluate the model using AUC, the metric used in the kaggle competition
      loss = model.evaluate(eval_x, eval_y, batch_size=batch_size)
  
      predictions = model.predict(eval_x, batch_size=batch_size)
      auc = tf.metrics.auc(eval_y, predictions)
  
      print("Evaluation Loss:", loss[0])
      print("Accuracy:", loss[1])
      print("AUC: ", auc[0][1])
  
file_path: tf-encrypted/examples/application/house-credit-default/main.py
imports: import argparse
  import os
  import time
  import tensorflow
  import tf2onnx
  from tensorflow import keras
  from tensorflow.keras import layers
  from tensorflow.python import errors_impl
  from utils import data_prep
  from utils import read_one_row
label_desc: Use image node_id 4 for calling a global function with example usage: train(train_x_df, train_y_df) without return types