code: def serialize(optimizer):
      """Serialize the optimizer configuration to JSON compatible python dict.
  
      The configuration can be used for persistence and reconstruct the `Optimizer`
      instance again.
  
      >>> tf.keras.optimizers.serialize(tf.keras.optimizers.SGD())
      {'class_name': 'SGD', 'config': {'name': 'SGD', 'learning_rate': 0.01,
                                       'decay': 0.0, 'momentum': 0.0,
                                       'nesterov': False}}
  
      Args:
        optimizer: An `Optimizer` instance to serialize.
  
      Returns:
        Python dict which contains the configuration of the input optimizer.
      """
      return serialize_keras_object(optimizer)
  
file_path: tensorflow/tensorflow/python/keras/optimizers.py
imports: from tensorflow.python.keras import backend
  from tensorflow.python.keras.optimizer_v1 import Optimizer
  from tensorflow.python.keras.optimizer_v1 import TFOptimizer
  from tensorflow.python.keras.optimizer_v2 import adadelta
  from tensorflow.python.keras.optimizer_v2 import adagrad
  from tensorflow.python.keras.optimizer_v2 import adam
  from tensorflow.python.keras.optimizer_v2 import adamax
  from tensorflow.python.keras.optimizer_v2 import ftrl
  from tensorflow.python.keras.optimizer_v2 import gradient_descent
  from tensorflow.python.keras.optimizer_v2 import nadam
  from tensorflow.python.keras.optimizer_v2 import optimizer_v2
  from tensorflow.python.keras.optimizer_v2 import rmsprop
  from tensorflow.python.keras.utils.generic_utils import deserialize_keras_object
  from tensorflow.python.keras.utils.generic_utils import serialize_keras_object
  from tensorflow.python.training import optimizer
label_desc: Use image node_id 1 for calling a global function with example usage: serialize(optimizer) and returns: serialize_keras_object