code: def decompile_func(func):
      """
      Decompile a function into ast.FunctionDef node.
  
      :param func: python function (can not be a built-in)
  
      :return: ast.FunctionDef instance.
      """
      code = func.__code__
  
      # For python 3
      #    defaults = func.func_defaults if sys.version_info.major < 3 else func.__defaults__
      #    if defaults:
      #        default_names = code.co_varnames[:code.co_argcount][-len(defaults):]
      #    else:
      #        default_names = []
      #    defaults = [_ast.Name(id='%s_default' % name, ctx=_ast.Load() , lineno=0, col_offset=0) for name in default_names]
      ast_node = make_function(
          code, defaults=[], lineno=code.co_firstlineno
      )
  
      return ast_node
  
file_path: turicreate/src/python/turicreate/meta/decompiler/__init__.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from .instructions import make_module, make_function
  import _ast
  import struct
  import time
  import sys
  import marshal
label_desc: Use image node_id 1 for calling a global function with example usage: decompile_func(func) and returns: ast_node