code: def foo(ctx, str):
      global mydoc
  
      #
      # test returning a node set works as expected
      #
      parent = mydoc.newDocNode(None, "p", None)
      mydoc.addChild(parent)
      node = mydoc.newDocText(str)
      parent.addChild(node)
      return [parent]
  
label_desc: Use image node_id 1 for calling a global function with example usage: foo(ctx, str) and returns: list