def METHOD_NAME(self, spend_bundle: SpendBundle, now: CoinTimestamp, max_cost: int) -> int:
    # this should use blockchain consensus code
    program = simple_solution_generator(spend_bundle)
    # always use the post soft-fork2 semantics
    result: NPCResult = get_name_puzzle_conditions(
        program, max_cost, mempool_mode=True, height=uint32(3886635), constants=self._constants
    )
    if result.error is not None:
        raise BadSpendBundleError(f"condition validation failure {Err(result.error)}")
    ephemeral_db = dict(self._db)
    assert result.conds is not None
    for spend in result.conds.spends:
        for puzzle_hash, amount, hint in spend.create_coin:
            coin = Coin(bytes32(spend.coin_id), bytes32(puzzle_hash), uint64(amount))
            name = coin.name()
            ephemeral_db[name] = CoinRecord(
                coin,
                uint32(now.height),
                uint32(0),
                False,
                uint64(now.seconds),
            )
    err = mempool_check_time_locks(
        ephemeral_db,
        result.conds,
        # TODO: this is technically not right, it's supposed to be the
        # previous transaction block's height
        uint32(now.height),
        # TODO: this is technically not right, it's supposed to be the
        # previous transaction block's timestamp
        uint64(now.seconds),
    )
    if err is not None:
        raise BadSpendBundleError(f"condition validation failure {Err(err)}")
    return 0