'Turns the object into something easy to serialize'

def __getstate__(self):

    state = dict(access_token=self.access_token, prefetched_data=self.prefetched_data, expires=self.expires)
    return state
