code: def outline(
      name,
      formal_parameters,
      out_parameters,
      stmts,
      has_return,
      has_break,
      has_cont,
  ):
      args = ast.arguments(
          [
              ast.Name(fp, ast.Param(), None, None)
              for fp in formal_parameters
          ],
          [],
          None,
          [],
          [],
          None,
          [],
      )
  
      if isinstance(stmts, ast.expr):
          assert not out_parameters, "no out parameters with expr"
          fdef = ast.FunctionDef(
              name, args, [ast.Return(stmts)], [], None, None
          )
      else:
          fdef = ast.FunctionDef(name, args, stmts, [], None, None)
  
          # this is part of a huge trick that plays with delayed type inference
          # it basically computes the return type based on out parameters, and
          # the return statement is unconditionally added so if we have other
          # returns, there will be a computation of the output type based on the
          # __combined of the regular return types and this one The original
          # returns have been patched above to have a different type that
          # cunningly combines with this output tuple
          #
          # This is the only trick I found to let pythran compute both the output
          # variable type and the early return type. But hey, a dirty one :-/
  
          stmts.append(
              ast.Return(
                  ast.Tuple(
                      [
                          ast.Name(fp, ast.Load(), None, None)
                          for fp in out_parameters
                      ],
                      ast.Load(),
                  )
              )
          )
          if has_return:
              pr = PatchReturn(stmts[-1], has_break or has_cont)
              pr.visit(fdef)
  
          if has_break or has_cont:
              if not has_return:
                  stmts[-1].value = ast.Tuple(
                      [ast.Constant(LOOP_NONE, None), stmts[-1].value],
                      ast.Load(),
                  )
              pbc = PatchBreakContinue(stmts[-1])
              pbc.visit(fdef)
  
      return fdef
  
imports: from pythran.analyses import ImportedIds, HasReturn, IsAssigned, CFG, HasBreak, HasContinue, DefUseChains, Ancestors, StaticExpressions, HasStaticExpression
  from pythran.passmanager import Transformation
  from pythran.syntax import PythranSyntaxError
  import gast
  from copy import deepcopy
label_desc: Use image node_id 1 for calling a global function with example usage: outline(name, formal_parameters, out_parameters, stmts, has_return, has_break, has_cont) and returns: fdef