def METHOD_NAME(cls, server_url, timestamp, salt):
    # check whether there is already an entity with the same ancestor path
    # in the datastore
    key = ndb.Key(
        'ServerUrl',
        str(server_url) or 'x',
        'TimeStamp',
        str(timestamp),
        cls,
        str(salt))
    cls._log(
        logging.DEBUG,
        u'NDBOpenIDStore: Getting OpenID nonce from datastore by key.')
    result = key.get()
    if result:
        # if so, the nonce is not valid so return False
        cls._log(
            logging.WARNING,
            u'NDBOpenIDStore: Nonce was already used!')
        return False
    else:
        # if not, store the key to datastore and return True
        nonce = cls(key=key)
        nonce.expiration_date = datetime.datetime.fromtimestamp(
            timestamp) + datetime.timedelta(0, openid.store.nonce.SKEW)
        cls._log(
            logging.DEBUG,
            u'NDBOpenIDStore: Putting new nonce to datastore.')
        nonce.put()
        return True