code: def _create_optimizer(self):
      self.global_step = tf.train.get_or_create_global_step()
      if self.tf or self._optimizer_type == "adam":
          dnn_optimizer = tf.train.AdamOptimizer(
              learning_rate=self._deep_learning_rate,
              beta1=0.9,
              beta2=0.999,
              epsilon=1e-8,
          )
      elif self._optimizer_type == "adagrad":
          dnn_optimizer = tf.train.AdagradOptimizer(
              learning_rate=self._deep_learning_rate,
              initial_accumulator_value=0.1,
              use_locking=False,
          )
      elif self._optimizer_type == "adamasync":
          dnn_optimizer = tf.train.AdamAsyncOptimizer(
              learning_rate=self._deep_learning_rate,
              beta1=0.9,
              beta2=0.999,
              epsilon=1e-8,
          )
      elif self._optimizer_type == "adagraddecay":
          dnn_optimizer = tf.train.AdagradDecayOptimizer(
              learning_rate=self._deep_learning_rate,
              global_step=self.global_step,
          )
      else:
          invalidInputError(False, "Optimzier type error.")
  
      linear_optimizer = tf.train.FtrlOptimizer(
          learning_rate=self._linear_learning_rate,
          l1_regularization_strength=0.0,
          l2_regularization_strength=0.0,
      )
      train_ops = []
      update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
      with tf.control_dependencies(update_ops):
          train_ops.append(
              dnn_optimizer.minimize(
                  self.loss,
                  var_list=tf.get_collection(
                      tf.GraphKeys.TRAINABLE_VARIABLES, scope="dnn"
                  ),
                  global_step=self.global_step,
              )
          )
          train_ops.append(
              linear_optimizer.minimize(
                  self.loss,
                  var_list=tf.get_collection(
                      tf.GraphKeys.TRAINABLE_VARIABLES, scope="linear"
                  ),
              )
          )
          self.train_op = tf.group(*train_ops)
  
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 6 for calling the WDL obj's underlying member method code with example usage: obj._create_optimizer() without return types