python tree example