code: def _create_fn(
      name,
      args,
      body,
      *,
      globals=None,
      locals=None,
      return_type=MISSING,
  ):
      # Note that we mutate locals when exec() is called.  Caller
      # beware!  The only callers are internal to this module, so no
      # worries about external callers.
      if locals is None:
          locals = {}
      return_annotation = ""
      if return_type is not MISSING:
          locals["_return_type"] = return_type
          return_annotation = "->_return_type"
      args = ",".join(args)
      body = "\n".join(f" {b}" for b in body)
  
      # Compute the text of the entire function.
      txt = f"def {name}({args}){return_annotation}:\n{body}"
  
      exec(txt, globals, locals)
      return locals[name]
  
imports: import re
  import sys
  import copy
  import types
  import inspect
  import keyword
label_desc: Use image node_id 3 for calling a global function with example usage: _create_fn(name, args, body) and returns: locals