Refactor `List.print_list` and `Tree.print_tree` in `art_apex_test.py`.
am: 09744acaab

Change-Id: I04b389a135a5e40790e8bf52b397f4d7cac06de0