code: def create_config(
      optimizer="sgd",
      optimizer_params=None,
      log_interval=10,
      seed=None,
      extra_config=None,
  ):
      if not optimizer_params:
          optimizer_params = {"learning_rate": 0.01}
      config = {
          "optimizer": optimizer,
          "optimizer_params": optimizer_params,
          "log_interval": log_interval,
      }
      if seed:
          config["seed"] = seed
      if extra_config:
          invalidInputError(
              isinstance(extra_config, dict),
              "extra_config must be a dict",
          )
          config.update(extra_config)
      return config
  
imports: import socket
  from contextlib import closing
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 2 for calling a global function with example usage: create_config(optimizer, optimizer_params, log_interval, seed, extra_config) and returns: config