code: def test_map_children():
      """Test recursive application of map on children"""
      # a
      # |   \  \   \
      # b    c  d   e
      # | \         |
      # f  g        h
      #
      # Should become
      #
      # 2
      # |   \  \   \
      # 3    3  3   3
      # | \         |
      # 4  4        4
  
      root = TreeNode(1)
      b = TreeNode(1, root)
      TreeNode(1, root)
      TreeNode(1, root)
      e = TreeNode(1, root)
  
      TreeNode(1, b)
      TreeNode(1, b)
  
      TreeNode(1, e)
  
      def increment(node, children):
          for child in TreeNode(0, None, children):
              child.item += 1
  
          return node.item + 1, children
  
      rval = root.map(increment, root.children)
      assert [node.item for node in rval] == [2, 3, 4, 4, 3, 3, 3, 4]
  
imports: from orion.core.utils.tree import DepthFirstTraversal, PreOrderTraversal, TreeNode, flattened
label_desc: Use image node_id 22 for calling a global function with example usage: test_map_children() and returns: unknown,  children