code: def test_map_parent():
      """Test recursive application of map on parents"""
      # a
      # |   \  \   \
      # b    c  d   e
      # | \         |
      # f  g        h
      #
      # Will give
      #
      # 4
      # |
      # 3
      # |
      # 2
  
      root = TreeNode(1)
      b = TreeNode(1, root)
      TreeNode(1, root)
      TreeNode(1, root)
      e = TreeNode(1, root)
  
      f = TreeNode(1, b)
      TreeNode(1, b)
  
      h = TreeNode(1, e)
  
      def increment_parent(node, parent):
          if parent is not None:
              for parent in parent.root:
                  parent.item += 1
  
          return node.item + 1, parent
  
      rval = f.map(increment_parent, f.parent)
      assert [node.item for node in rval.root] == [4, 3, 2]
  
      rval = h.map(increment_parent, h.parent)
      assert [node.item for node in rval.root] == [4, 3, 2]
  
imports: from orion.core.utils.tree import DepthFirstTraversal, PreOrderTraversal, TreeNode, flattened
label_desc: Use image node_id 23 for calling a global function with example usage: test_map_parent() and returns: unknown,  parent