<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_recommender(ctx, weeks, processes):
 """ Download and build the recommendations. - Fetch new statistics from the current week. - Generate recommendations. - Update the recommendations. """

    weeks = get_last_weeks(weeks)
    recommender = RecordRecommender(config)
    # Redownload incomplete weeks
    first_weeks = weeks[:2]
    recommender.fetch_weeks(first_weeks, overwrite=True)
    # Download missing weeks
    recommender.fetch_weeks(weeks, overwrite=False)

    print("Build Profiles")
    ctx.invoke(profiles, weeks=weeks)

    print("Generate Recommendations")
    ctx.invoke(build, processes=processes)