<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def important_dates(year):
 """Returns a dictionary of important dates"""

    output = {}
    data = mlbgame.data.get_important_dates(year)
    important_dates = etree.parse(data).getroot().\
        find('queryResults').find('row')
    try:
        for x in important_dates.attrib:
            output[x] = important_dates.attrib[x]
    except AttributeError:
        raise ValueError('Unable to find important dates for {}.'.format(year))
    return output