def printtree(self)if self leftself left printtree(printself data)if self rightself right printtree(postorder traversal left ->right -root def postordertraversal(selfroot)res [if rootres self postordertraversal(root leftres res self postordertraversal(root rightres append(root datareturn res root node( root insert( root insert( root insert( root insert( root insert( root insert( print(root postordertraversal(root)when the above code is executedit produces the following result[