code: def serialize_with_public_fn(fn, config, fn_module_name=None):
      """Serializes functions from public Keras API or object registration.
  
      Called to check and retrieve the config of any function that has a public
      Keras API or has been registered as serializable via
      `keras.saving.register_keras_serializable()`. If function's module name
      is already known, returns corresponding config.
      """
      if fn_module_name:
          return {
              "module": fn_module_name,
              "class_name": "function",
              "config": config,
              "registered_name": config,
          }
      keras_api_name = api_export.get_name_from_symbol(fn)
      if keras_api_name:
          parts = keras_api_name.split(".")
          return {
              "module": ".".join(parts[:-1]),
              "class_name": "function",
              "config": config,
              "registered_name": config,
          }
      else:
          registered_name = object_registration.get_registered_name(fn)
          if not registered_name and not fn.__module__ == "builtins":
              return None
          return {
              "module": fn.__module__,
              "class_name": "function",
              "config": config,
              "registered_name": registered_name,
          }
  
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 9 for calling a global function with example usage: serialize_with_public_fn(fn, config, fn_module_name) and returns: dict, dict, dict, None