code: def func_dump(func):
      """Serializes a user-defined function.
  
      Args:
          func: the function to serialize.
  
      Returns:
          A tuple `(code, defaults, closure)`.
      """
      if os.name == "nt":
          raw_code = marshal.dumps(func.__code__).replace(b"\\", b"/")
          code = codecs.encode(raw_code, "base64").decode("ascii")
      else:
          raw_code = marshal.dumps(func.__code__)
          code = codecs.encode(raw_code, "base64").decode("ascii")
      defaults = func.__defaults__
      if func.__closure__:
          closure = tuple(c.cell_contents for c in func.__closure__)
      else:
          closure = None
      return code, defaults, closure
  
file_path: keras/keras/utils/python_utils.py
imports: import binascii
  import codecs
  import marshal
  import os
  import types
label_desc: Use image node_id 3 for calling a global function with example usage: func_dump(func) and returns: code,  defaults,  closure