code: def translate(fn):
      visitor = lambda_closure_visitor()
      if sys.version_info.major == 2:
          visitor.caller_globals = fn.__globals__.copy()
          func_closure = fn.__closure__
          co_freevars = fn.__code__.co_freevars
      else:
          visitor.caller_globals = fn.__globals__.copy()
          func_closure = fn.__closure__
          co_freevars = fn.__code__.co_freevars
      # now. annoyingly enough certain captures are not here. We need to
      # look in func_closures for it
      if func_closure:
          closure = dict(
              zip(co_freevars, (c.cell_contents for c in func_closure))
          )
          # inject closure into "caller_globals"
          for i in closure:
              visitor.caller_globals[i] = closure[i]
  
      ast_node = None
      try:
          if not _isalambda(fn):
              ast_node = ast.parse(inspect.getsource(fn))
      except:
          pass
  
      try:
          if ast_node is None:
              ast_node = meta.decompiler.decompile_func(fn)
      except:
          pass
  
      if ast_node is None:
          raise RuntimeError("Cannot process provided function")
      visitor.translate_ast(ast_node)
      return visitor
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import sys
  import ast
  import inspect
  from ..None import meta
label_desc: Use image node_id 2 for calling a global function with example usage: translate(fn) and returns: visitor