Generalization Error Bounds for Two-stage Recommender Systems with Tree Structure