code: def build_feature_columns():
      # Notes: Statistics of Kaggle's Criteo Dataset has been calculated in advance to save time.
      mins_list = [
          0.0,
          -3.0,
          0.0,
          0.0,
          0.0,
          0.0,
          0.0,
          0.0,
          0.0,
          0.0,
          0.0,
          0.0,
          0.0,
      ]
      range_list = [
          1539.0,
          22069.0,
          65535.0,
          561.0,
          2655388.0,
          233523.0,
          26297.0,
          5106.0,
          24376.0,
          9.0,
          181.0,
          1807.0,
          6879.0,
      ]
  
      def make_minmaxscaler(min, range):
          def minmaxscaler(col):
              return (col - min) / range
  
          return minmaxscaler
  
      deep_columns = []
      wide_columns = []
      for column_name in FEATURE_COLUMNS:
          if column_name in CATEGORICAL_COLUMNS:
              categorical_column = (
                  tf.feature_column.categorical_column_with_identity(
                      column_name, num_buckets=10000
                  )
              )
              # categorical_column = tf.feature_column.categorical_column_with_hash_bucket(
              #      column_name, hash_bucket_size=10000, dtype=tf.int64)
              wide_columns.append(categorical_column)
  
              if not args.tf:
                  """Feature Elimination of EmbeddingVariable Feature"""
                  if args.ev_elimination == "gstep":
                      # Feature elimination based on global steps
                      evict_opt = tf.GlobalStepEvict(steps_to_live=4000)
                  elif args.ev_elimination == "l2":
                      # Feature elimination based on l2 weight
                      evict_opt = tf.L2WeightEvict(
                          l2_weight_threshold=1.0
                      )
                  else:
                      evict_opt = None
                  """Feature Filter of EmbeddingVariable Feature"""
                  if args.ev_filter == "cbf":
                      # CBF-based feature filter
                      filter_option = tf.CBFFilter(
                          filter_freq=3,
                          max_element_size=2**30,
                          false_positive_probability=0.01,
                          counter_type=tf.int64,
                      )
                  elif args.ev_filter == "counter":
                      # Counter-based feature filter
                      filter_option = tf.CounterFilter(filter_freq=3)
                  else:
                      filter_option = None
                  ev_opt = tf.EmbeddingVariableOption(
                      evict_option=evict_opt,
                      filter_option=filter_option,
                  )
  
                  if args.ev:
                      """Embedding Variable Feature"""
                      categorical_column = tf.feature_column.categorical_column_with_embedding(
                          column_name, dtype=tf.int64, ev_option=ev_opt
                      )
                  elif args.adaptive_emb:
                      """Adaptive Embedding Feature Part 2 of 2
                      Except the follow code, a dict, 'adaptive_mask_tensors', is need as the input of
                      'tf.feature_column.input_layer(adaptive_mask_tensors=adaptive_mask_tensors)'.
                      For column 'COL_NAME',the value of adaptive_mask_tensors['$COL_NAME'] is a int32
                      tensor with shape [batch_size].
                      """
                      categorical_column = tf.feature_column.categorical_column_with_adaptive_embedding(
                          column_name,
                          hash_bucket_size=HASH_BUCKET_SIZES[
                              column_name
                          ],
                          dtype=tf.int64,
                          ev_option=ev_opt,
                      )
                  elif args.dynamic_ev:
                      """Dynamic-dimension Embedding Variable"""
                      print(
                          "Dynamic-dimension Embedding Variable isn't really enabled in model."
                      )
                      sys.exit()
  
              if args.tf or not args.emb_fusion:
                  embedding_column = tf.feature_column.embedding_column(
                      categorical_column,
                      dimension=EMBEDDING_DIMENSIONS[column_name],
                      combiner="mean",
                  )
              else:
                  """Embedding Fusion Feature"""
                  embedding_column = tf.feature_column.embedding_column(
                      categorical_column,
                      dimension=EMBEDDING_DIMENSIONS[column_name],
                      combiner="mean",
                      do_fusion=args.emb_fusion,
                  )
  
              deep_columns.append(embedding_column)
          else:
              normalizer_fn = None
              i = CONTINUOUS_COLUMNS.index(column_name)
              normalizer_fn = make_minmaxscaler(
                  mins_list[i], range_list[i]
              )
              column = tf.feature_column.numeric_column(
                  column_name, normalizer_fn=normalizer_fn, shape=(1,)
              )
              wide_columns.append(column)
              deep_columns.append(column)
  
      return wide_columns, deep_columns
  
imports: import time
  import argparse
  import tensorflow
  import os
  import sys
  import math
  import collections
  from tensorflow.python.client import timeline
  import json
  from tensorflow.python.ops import partitioned_variables
  import ray
  from bigdl.dllib.utils.log4Error import *
  from bigdl.orca import init_orca_context, stop_orca_context, OrcaContext
  from bigdl.orca.data.utils import process_spark_xshards
  from bigdl.orca.learn.utils import maybe_dataframe_to_xshards
  from bigdl.friesian.feature import FeatureTable
label_desc: Use image node_id 1 for calling a global function with example usage: build_feature_columns() and returns: wide_columns,  deep_columns, minmaxscaler, unknown