code: def _serialize_function_to_config(function):
      """Serialize the function for get_config()."""
      if isinstance(function, python_types.LambdaType):
          output = generic_utils.func_dump(function)
          output_type = "lambda"
          module = function.__module__
      elif callable(function):
          output = function.__name__
          output_type = "function"
          module = function.__module__
      else:
          raise ValueError(
              "Unrecognized function type for input: {}".format(
                  type(function)
              )
          )
  
      return output, output_type, module
  
imports: import hashlib
  import numbers
  import sys
  import types
  import warnings
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.keras.utils import generic_utils
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 for calling a global function with example usage: _serialize_function_to_config(function) and returns: output,  output_type,  module