code: def _build_estimator(config, hidden_units=None, warm_start_from=None):
      """Build an estimator for predicting the tipping behavior of taxi riders.
  
      Args:
        config: tf.contrib.learn.RunConfig defining the runtime environment for the
          estimator (including model_dir).
        hidden_units: [int], the layer sizes of the DNN (input layer first)
        warm_start_from: Optional directory to warm start from.
  
      Returns:
        A dict of the following:
          - estimator: The estimator that will be used for training and eval.
          - train_spec: Spec for training.
          - eval_spec: Spec for eval.
          - eval_input_receiver_fn: Input function for eval.
      """
      real_valued_columns = [
          tf.feature_column.numeric_column(key, shape=())
          for key in _transformed_names(_DENSE_FLOAT_FEATURE_KEYS)
      ]
      categorical_columns = [
          tf.feature_column.categorical_column_with_identity(
              key, num_buckets=_VOCAB_SIZE + _OOV_SIZE, default_value=0
          )
          for key in _transformed_names(_VOCAB_FEATURE_KEYS)
      ]
      categorical_columns += [
          tf.feature_column.categorical_column_with_identity(
              key, num_buckets=_FEATURE_BUCKET_COUNT, default_value=0
          )
          for key in _transformed_names(_BUCKET_FEATURE_KEYS)
      ]
      categorical_columns += [
          tf.feature_column.categorical_column_with_identity(  # pylint: disable=g-complex-comprehension
              key, num_buckets=num_buckets, default_value=0
          )
          for key, num_buckets in zip(
              _transformed_names(_CATEGORICAL_FEATURE_KEYS),
              _MAX_CATEGORICAL_FEATURE_VALUES,
          )
      ]
      return tf_estimator.DNNLinearCombinedClassifier(
          config=config,
          linear_feature_columns=categorical_columns,
          dnn_feature_columns=real_valued_columns,
          dnn_hidden_units=hidden_units or [100, 70, 50, 25],
          warm_start_from=warm_start_from,
      )
  
file_path: tfx/tfx/examples/custom_components/slack/example/taxi_utils_slack.py
imports: from typing import List
  import tensorflow
  from tensorflow import estimator
  import tensorflow_model_analysis
  import tensorflow_transform
  from tensorflow_transform.tf_metadata import schema_utils
  from tfx.components.trainer.fn_args_utils import DataAccessor
  from tfx_bsl.tfxio import dataset_options
label_desc: Use image node_id 6 for calling a global function with example usage: _build_estimator(config, hidden_units, warm_start_from) and returns: tf_estimator