code: def mark_unexported_functions(ir, exported_functions):
      from pythran.metadata import add as MDadd, Local as MDLocal
  
      for node in ir.body:
          if hasattr(node, "name"):
              if node.name not in exported_functions:
                  MDadd(node, MDLocal())
      return ir
  
imports: from pythran.analyses import ExtendedSyntaxCheck
  from pythran.optimizations import ComprehensionPatterns, ListCompToGenexp, RemoveDeadFunctions
  from pythran.transformations import ExpandBuiltins, ExpandImports, ExpandImportAll, FalsePolymorphism, NormalizeCompare, NormalizeException, NormalizeMethodCalls, NormalizeReturn, NormalizeTuples, RemoveComprehension, RemoveNestedFunctions, RemoveLambdas, UnshadowParameters, RemoveNamedArguments, ExpandGlobals, NormalizeIsNone, NormalizeIfElse, NormalizeTypeIs, NormalizeStaticIf, SplitStaticExpression, RemoveFStrings
  import re
label_desc: Use image node_id 2 for calling a global function with example usage: mark_unexported_functions(ir, exported_functions) and returns: ir