print_container helper function