Learning from Teaching Assistants to Program with Subgoals: Exploring the Potential for AI Teaching Assistants