def METHOD_NAME(cls, server_url, association):
    # store an entity with key = server_url
    issued = datetime.datetime.fromtimestamp(association.issued)
    lifetime = datetime.timedelta(0, association.lifetime)
    expiration_date = issued + lifetime
    entity = cls.get_or_insert(
        association.handle, parent=ndb.Key(
            'ServerUrl', server_url))
    entity.serialized = association.serialize()
    entity.expiration_date = expiration_date
    entity.issued = association.issued
    cls._log(
        logging.DEBUG,
        u'NDBOpenIDStore: Putting OpenID association to datastore.')
    entity.put()