<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def events(self, year, simple=False, keys=False):
 """ Get a list of events in a given year. :param year: Year to get events from. :param keys: Get only keys of the events rather than full data. :param simple: Get only vital data. :return: List of string event keys or Event objects. """

        if keys:
            return self._get('events/%s/keys' % year)
        else:
            return [Event(raw) for raw in self._get('events/%s%s' % (year, '/simple' if simple else ''))]