<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(link):
 """Parses a Tv Series returns the dataset as a dictionary """

    html = get_html(link)

    data = {'rating': get_rating(html),
            'name': get_name_date(html)[0]}

    div = html.find(id="title-episode-widget")
    season_tags = get_a(div, find="season=")
    episodes = {}
    for slink in season_tags:
        for e in episode_list(slink):
            season, d = parse_episode(e)
            if season in episodes:
                episodes[season].append(d)
            else:
                episodes[season] = [d]
    data['episodes'] = episodes
    return data