def gdrive_activities(service, max_results):
    """
    Outputs a list of the last 'max_results' google drive evetns.
    :param service: a Google Admin SDK Reports API service object
    :param max_results:
    :return: a list
    """

    # See Google Apps Admin SDK > Reports API > Activities: list
    # https://developers.google.com/admin-sdk/reports/v1/reference/activities/list

    print('Getting the last {} events'.format(max_results))

    results = service.activities().list(
        applicationName='drive',
        userKey='all',
        maxResults=max_results
    ).execute()

    return results.get('items', [])