code: def serialize_with_public_class(cls, inner_config=None):
      """Serializes classes from public Keras API or object registration.
  
      Called to check and retrieve the config of any class that has a public
      Keras API or has been registered as serializable via
      `keras.saving.register_keras_serializable()`.
      """
      # This gets the `keras.*` exported name, such as
      # "keras.optimizers.Adam".
      keras_api_name = api_export.get_name_from_symbol(cls)
  
      # Case of custom or unknown class object
      if keras_api_name is None:
          registered_name = object_registration.get_registered_name(cls)
          if registered_name is None:
              return None
  
          # Return custom object config with corresponding registration name
          return {
              "module": cls.__module__,
              "class_name": cls.__name__,
              "config": inner_config,
              "registered_name": registered_name,
          }
  
      # Split the canonical Keras API name into a Keras module and class name.
      parts = keras_api_name.split(".")
      return {
          "module": ".".join(parts[:-1]),
          "class_name": parts[-1],
          "config": inner_config,
          "registered_name": None,
      }
  
imports: import importlib
  import inspect
  import types
  import warnings
  import numpy
  from keras import api_export
  from keras import backend
  from keras.api_export import keras_export
  from keras.backend.common import global_state
  from keras.saving import object_registration
  from keras.utils import python_utils
  from keras.utils.module_utils import tensorflow
label_desc: Use image node_id 8 for calling a global function with example usage: serialize_with_public_class(cls, inner_config) and returns: dict, dict, None