code: def build_model(column_info, hidden_units=[100, 50, 25]):
      """Build an estimator appropriate for the given model type."""
      wide_base_input_layers = []
      wide_base_layers = []
      for i in range(len(column_info.wide_base_cols)):
          wide_base_input_layers.append(
              tf.keras.layers.Input(shape=[], dtype="int32")
          )
          wide_base_layers.append(
              tf.keras.backend.one_hot(
                  wide_base_input_layers[i],
                  column_info.wide_base_dims[i] + 1,
              )
          )
  
      wide_cross_input_layers = []
      wide_cross_layers = []
      for i in range(len(column_info.wide_cross_cols)):
          wide_cross_input_layers.append(
              tf.keras.layers.Input(shape=[], dtype="int32")
          )
          wide_cross_layers.append(
              tf.keras.backend.one_hot(
                  wide_cross_input_layers[i],
                  column_info.wide_cross_dims[i],
              )
          )
  
      indicator_input_layers = []
      indicator_layers = []
      for i in range(len(column_info.indicator_cols)):
          indicator_input_layers.append(
              tf.keras.layers.Input(shape=[], dtype="int32")
          )
          indicator_layers.append(
              tf.keras.backend.one_hot(
                  indicator_input_layers[i],
                  column_info.indicator_dims[i] + 1,
              )
          )
  
      embed_input_layers = []
      embed_layers = []
      for i in range(len(column_info.embed_in_dims)):
          embed_input_layers.append(
              tf.keras.layers.Input(shape=[], dtype="int32")
          )
          embedding_layer = tf.keras.layers.Embedding(
              column_info.embed_in_dims[i] + 1,
              output_dim=column_info.embed_out_dims[i],
          )
          iembed = embedding_layer(embed_input_layers[i])
          flat_embed = tf.keras.layers.Flatten()(iembed)
          embed_layers.append(flat_embed)
  
      continuous_input_layers = []
      continuous_layers = []
      for i in range(len(column_info.continuous_cols)):
          continuous_input_layers.append(
              tf.keras.layers.Input(shape=[])
          )
          continuous_layers.append(
              tf.keras.layers.Reshape(target_shape=(1,))(
                  continuous_input_layers[i]
              )
          )
  
      if len(wide_base_layers + wide_cross_layers) > 1:
          wide_input = tf.keras.layers.concatenate(
              wide_base_layers + wide_cross_layers, axis=1
          )
      else:
          wide_input = (wide_base_layers + wide_cross_layers)[0]
      wide_out = tf.keras.layers.Dense(1)(wide_input)
      if len(indicator_layers + embed_layers + continuous_layers) > 1:
          deep_concat = tf.keras.layers.concatenate(
              indicator_layers + embed_layers + continuous_layers,
              axis=1,
          )
      else:
          deep_concat = (
              indicator_layers + embed_layers + continuous_layers
          )[0]
      linear = deep_concat
      for ilayer in range(0, len(hidden_units)):
          linear_mid = tf.keras.layers.Dense(hidden_units[ilayer])(
              linear
          )
          bn = tf.keras.layers.BatchNormalization()(linear_mid)
          relu = tf.keras.layers.ReLU()(bn)
          dropout = tf.keras.layers.Dropout(0.1)(relu)
          linear = dropout
      deep_out = tf.keras.layers.Dense(1)(linear)
      added = tf.keras.layers.add([wide_out, deep_out])
      out = tf.keras.layers.Activation("sigmoid")(added)
      model = tf.keras.models.Model(
          wide_base_input_layers
          + wide_cross_input_layers
          + indicator_input_layers
          + embed_input_layers
          + continuous_input_layers,
          out,
      )
  
      return model
  
imports: from __future__ import division, print_function, unicode_literals
  import sys
  import os
  import math
  from optparse import OptionParser
  from time import time
  import tempfile
  from bigdl.friesian.utils import SafePickle
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.data.file import exists, makedirs
  from bigdl.friesian.feature import FeatureTable
  from bigdl.dllib.utils.file_utils import get_remote_file_to_local
  from bigdl.orca.learn.tf2.estimator import Estimator
  import tensorflow
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 2 for calling a global function with example usage: build_model(column_info, hidden_units) and returns: model